diff options
author | Michael Francis <edude03@gmail.com> | 2011-07-09 21:16:06 -0400 |
---|---|---|
committer | Michael Francis <edude03@gmail.com> | 2011-07-09 21:16:25 -0400 |
commit | 4aeeb2223e98d574dc842cb0a067b3922b7905df (patch) | |
tree | 81968e2ae08c5b5eb00d414413ef24b83c330953 /config | |
parent | 9ce23b97954ffd22b4f9831ae3a795f01b347d0b (diff) | |
download | otakuhub-4aeeb2223e98d574dc842cb0a067b3922b7905df.tar.xz |
Switched from my hacked code to lithium's new post auth validation https://github.com/UnionOfRAD/lithium/blob/master/security/auth/adapter/Form.php#L109
Diffstat (limited to 'config')
-rw-r--r-- | config/bootstrap/auth.php | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/config/bootstrap/auth.php b/config/bootstrap/auth.php index 87ee787..ea6ef2e 100644 --- a/config/bootstrap/auth.php +++ b/config/bootstrap/auth.php @@ -24,24 +24,11 @@ Auth::config(array( //'scope' => array('active' => 'true'), //The active field must be true otherwise they can't auth, though we need //to eventually send them to a page that explains they are banned. 'session' => array('options' => array('name' => 'default')), - 'filters' => array( - 'password' => function($password) - { - return $password; //prevents li3 from hashing the password before hand. - }, - function($data) { - if(isset($data['username'])) - { - //Get the user from the database - $user = User::find('first', array('conditions' => array('username' => $data['username']))); - //Hash the submitted password with the stored salt. - $data['password'] = Password::hash($data['password'], $user->salt); - } - return $data; - } - ) + 'validators' => array( + 'password' => function($form, $data) { + return password::check($form, $data); + }) ) - ) ); $secret = "cake"; |