Selaa lähdekoodia

Should be $input not $data (fixed typo)

Michael Francis 14 vuotta sitten
vanhempi
commit
01cb2f0517
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      controllers/UsersController.php

+ 2 - 2
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))) {