Page 1 of 1

cakePHP login issue

Posted: Sun Apr 18, 2010 11:45 pm
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?

Re: cakePHP login issue

Posted: Sun Apr 18, 2010 11:48 pm
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

Re: cakePHP login issue

Posted: Mon Apr 19, 2010 12:07 am
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....

Re: cakePHP login issue

Posted: Mon Apr 19, 2010 1:00 am
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....