Skip to content
Snippets Groups Projects
Commit c3f4fb63 authored by Gina Haeussge's avatar Gina Haeussge
Browse files

Usermanager: Add autogeneration of password

    The password of a newly added user account is now autogenerated
    if the backend supports it, the password field is left empty and
    the notification of the user is enabled. A corresponding note was
    added to the dialog to inform admins about this behaviour.

darcs-hash:20080901170041-2b4f5-e66173fe74395a1dab8e6deaf59541d258d4bacb.gz
parent 46c0ed74
No related branches found
No related tags found
No related merge requests found
......@@ -283,6 +283,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$this->_htmlInputField($cmd."_usergroups","usergroups",$this->lang["user_groups"],$groups,$this->_auth->canDo("modGroups"),$indent+6);
if ($this->_auth->canDo("modPass")) {
$notes[] = $this->lang['note_pass'];
if ($user) {
$notes[] = $this->lang['note_notify'];
}
......@@ -341,7 +342,14 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser();
if (empty($user)) return false;
if (empty($pass) || empty($name) || empty($mail)){
if (empty($pass)){
if(!empty($_REQUEST['usernotify'])){
$pass = auth_pwgen();
} else {
return false;
}
}
if (empty($name) || empty($mail)){
msg($this->lang['add_fail'], -1);
return false;
}
......
......@@ -43,6 +43,7 @@ $lang['edit_usermissing'] = 'Der ausgewählte Nutzer wurde nicht gefunden.
$lang['user_notify'] = 'Nutzer benachrichtigen';
$lang['note_notify'] = 'Benachrichtigungsmails werden nur versandt wenn ein neues Passwort vergeben wurde.';
$lang['note_group'] = 'Neue Nutzer werden der Standard-Gruppe (%s) hinzugefügt, wenn keine Gruppe angegeben wurde.';
$lang['note_pass'] = 'Das Password wird automatisch generiert wenn das entsprechende Feld leergelassen wird und die Benachrichtigung des Nutzers aktiviert ist.';
$lang['add_ok'] = 'Nutzer erfolgreich angelegt';
$lang['add_fail'] = 'Nutzer konnte nicht angelegt werden';
$lang['notify_ok'] = 'Benachrichtigungsmail wurde versandt';
......
......@@ -50,6 +50,7 @@ $lang['edit_usermissing'] = 'Selected user not found, the specified user name ma
$lang['user_notify'] = 'Notify user';
$lang['note_notify'] = 'Notification emails are only sent if the user is given a new password.';
$lang['note_group'] = 'New users will be added to the default group (%s) if no group is specified.';
$lang['note_pass'] = 'The password will be autogenerated if the field is left empty and notification of the user is enabled.';
$lang['add_ok'] = 'User added successfully';
$lang['add_fail'] = 'User addition failed';
$lang['notify_ok'] = 'Notification email sent';
......
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