Is it a good or a bad practice to validate passwords before hashing?
Is the following solution, the best?
//register function
function register() {
if (!empty($this->data)) {
if ($this->data['User']['password'] == $this-
>Auth->password($this-
>data['User']['password_confirm'])) {
$this->User->create() && $this->User-
>validates();
if ($this->User->save($this->data)) {
$this->Session->setFlash("You
have been registered! You can log
in now.");
$this->redirect(array('action'
=> 'index'));
}
}
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---