Skip to content
Snippets Groups Projects
Commit 93eefc2f authored by Andreas Gohr's avatar Andreas Gohr
Browse files

generate password if wanted on usermodify FS#1873

parent 2ae68f97
No related branches found
No related tags found
No related merge requests found
...@@ -398,7 +398,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ...@@ -398,7 +398,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
} }
} else { } else {
if (!empty($mail)){ if (!empty($mail)){
return false; return false;
} }
} }
...@@ -506,6 +506,11 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ...@@ -506,6 +506,11 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
} }
} }
// generate password if left empty and notification is on
if(!empty($_REQUEST['usernotify']) && empty($newpass)){
$newpass = auth_pwgen();
}
if (!empty($newpass) && $this->_auth->canDo('modPass')) if (!empty($newpass) && $this->_auth->canDo('modPass'))
$changes['pass'] = $newpass; $changes['pass'] = $newpass;
if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name']) if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name'])
......
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