Skip to content
Snippets Groups Projects
Verified Commit fa5f7538 authored by Damien's avatar Damien
Browse files

FEAT Change password after reset

parent 0a6b3562
No related branches found
No related tags found
No related merge requests found
...@@ -193,7 +193,7 @@ class UserModelAbstract ...@@ -193,7 +193,7 @@ class UserModelAbstract
return true; return true;
} }
public static function resetPassword(array $aArgs = []) public static function resetPassword(array $aArgs)
{ {
ValidatorModel::notEmpty($aArgs, ['id']); ValidatorModel::notEmpty($aArgs, ['id']);
ValidatorModel::intVal($aArgs, ['id']); ValidatorModel::intVal($aArgs, ['id']);
...@@ -201,7 +201,8 @@ class UserModelAbstract ...@@ -201,7 +201,8 @@ class UserModelAbstract
DatabaseModel::update([ DatabaseModel::update([
'table' => 'users', 'table' => 'users',
'set' => [ 'set' => [
'password' => SecurityModel::getPasswordHash('maarch') 'password' => SecurityModel::getPasswordHash('maarch'),
'change_password' => 'Y',
], ],
'where' => ['id = ?'], 'where' => ['id = ?'],
'data' => [$aArgs['id']] 'data' => [$aArgs['id']]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment