|
@@ -352,13 +352,13 @@ class UsersController extends \lithium\action\Controller {
|
|
|
{
|
|
{
|
|
|
//Get the user from auth
|
|
//Get the user from auth
|
|
|
$user = Auth::check('default');
|
|
$user = Auth::check('default');
|
|
|
- if(!empty($user) && ($data['newpass'] == $data['confirm']))
|
|
|
|
|
|
|
+ if(!empty($user) && isset($input['newpass']))
|
|
|
{
|
|
{
|
|
|
//find the user by their ID
|
|
//find the user by their ID
|
|
|
$user = User::find($user['_id']);
|
|
$user = User::find($user['_id']);
|
|
|
|
|
|
|
|
//Set the newpassword, this triggers the hash function in ->save()
|
|
//Set the newpassword, this triggers the hash function in ->save()
|
|
|
- $user->newpass = $data['newpass'];
|
|
|
|
|
|
|
+ $user->newpass = $input['newpass'];
|
|
|
|
|
|
|
|
//Save the data
|
|
//Save the data
|
|
|
if ($user->save(null, array('validate' => false))) {
|
|
if ($user->save(null, array('validate' => false))) {
|