summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--controllers/UsersController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/controllers/UsersController.php b/controllers/UsersController.php
index 844e6f9..c168066 100644
--- a/controllers/UsersController.php
+++ b/controllers/UsersController.php
@@ -352,13 +352,13 @@ class UsersController extends \lithium\action\Controller {
{
//Get the user from auth
$user = Auth::check('default');
- if(!empty($user) && ($data['newpass'] == $data['confirm']))
+ if(!empty($user) && isset($input['newpass']))
{
//find the user by their ID
$user = User::find($user['_id']);
//Set the newpassword, this triggers the hash function in ->save()
- $user->newpass = $data['newpass'];
+ $user->newpass = $input['newpass'];
//Save the data
if ($user->save(null, array('validate' => false))) {