Auth token for users

This commit is contained in:
Diego Najar 2017-07-05 23:42:28 +02:00
parent 967cbb5179
commit 6fba1fd005
2 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,7 @@ function setPassword($username, $new_password, $confirm_password)
{ {
global $dbUsers; global $dbUsers;
global $Language; global $Language;
global $Syslog;
// Password length // Password length
if( strlen($new_password) < 6 ) if( strlen($new_password) < 6 )
@ -20,6 +21,11 @@ function setPassword($username, $new_password, $confirm_password)
{ {
if( $dbUsers->setPassword($username, $new_password) ) { if( $dbUsers->setPassword($username, $new_password) ) {
Alert::set($Language->g('The changes have been saved'), ALERT_STATUS_OK); Alert::set($Language->g('The changes have been saved'), ALERT_STATUS_OK);
// Add to syslog
$Syslog->add(array(
'dictionaryKey'=>'user-password-changed',
'notes'=>$username
));
return true; return true;
} }
else { else {

View File

@ -264,7 +264,9 @@
"new-page-created": "New page created", "new-page-created": "New page created",
"page-deleted": "Page deleted", "page-deleted": "Page deleted",
"page-edited": "Page edited", "page-edited": "Page edited",
"user-edited": "User edited",
"changes-on-settings": "Changes on settings", "changes-on-settings": "Changes on settings",
"plugin-installed": "Plugin installed" "plugin-installed": "Plugin installed",
"user-password-changed": "User password changed"
} }