cakePHP login issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
indian98476
Forum Commoner
Posts: 78
Joined: Tue Dec 15, 2009 3:24 am

cakePHP login issue

Post by indian98476 »

hi
i am working on the cakehp framework for a site i have to build....i am suffering a login problem now...
in the register page i got two fields for password and password confirm....and when i try to login with Auth compnent, it gives error cos cakePHP only sees the first password as a valid password field and hashes it while the second one remains unhashed....it causes problems resultig in invalid username/password.....anyone got a way out of it?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: cakePHP login issue

Post by Benjamin »

Forum Rules wrote: 11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.
You may also want to read:
  1. General Posting Guidelines
  2. Posting Code in the Forums
  3. PHP Manual
  4. PHP Tutorials
indian98476
Forum Commoner
Posts: 78
Joined: Tue Dec 15, 2009 3:24 am

Re: cakePHP login issue

Post by indian98476 »

i haven't used any short forms here....infact Auth is the authentication component in cakePHP i believe....so i have to use it as Auth....
indian98476
Forum Commoner
Posts: 78
Joined: Tue Dec 15, 2009 3:24 am

Re: cakePHP login issue

Post by indian98476 »

in the password match function insert this line:
$password_confirm = Security::hash(Configure::read('Security.salt') . $data[$keys[0]]);
does the trick...tall thanx 2 cakePHP manual....
Post Reply