diff options
-rw-r--r-- | config/bootstrap/auth.php | 3 | ||||
-rw-r--r-- | models/User.php | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/config/bootstrap/auth.php b/config/bootstrap/auth.php index 11c963f..75a2b5a 100644 --- a/config/bootstrap/auth.php +++ b/config/bootstrap/auth.php @@ -7,6 +7,7 @@ use lithium\core\Libraries; use lithium\action\Dispatcher; use lithium\net\http\Router; use lithium\action\Response; +use lithium\security\Password; Session::config(array( @@ -37,7 +38,7 @@ Auth::config(array( //The password to query is the password from the request //hashed with the users stored salt - $data['password'] = String::hashPassword($data['password'], $salt->salt); + $data['password'] = Password::hash($data['password'], $salt->salt); } return $data; }) diff --git a/models/User.php b/models/User.php index 20c102a..1c1fe64 100644 --- a/models/User.php +++ b/models/User.php @@ -6,6 +6,7 @@ use \MongoDate; use \lithium\util\String; use \lithium\util\Validator; use \App\Libraries\openID\LightOpenID; +use \lithium\security\Password; class User extends \lithium\data\Model { //To bypass mongo bug @@ -332,7 +333,7 @@ class User extends \lithium\data\Model { if(!empty($entity->newpass) || !$entity->exists()) { //Generate Salt for the user. - $salt = String::genSalt('bf', 6); + $salt = Password::salt('bf', 6); //Hash their password. $data['password'] = String::hashPassword($entity->newpass, $salt); |