Skip to content
Snippets Groups Projects
Commit abd3bd10 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

allow (re)setting password for admin and root, fixes #866

parent 2ffb6d94
No related branches found
No related tags found
No related merge requests found
...@@ -256,12 +256,12 @@ class UserManagement ...@@ -256,12 +256,12 @@ class UserManagement
} }
if (!$perm->is_fak_admin() && $newuser['auth_user_md5.perms'] === 'admin') { if (!$perm->is_fak_admin() && $newuser['auth_user_md5.perms'] === 'admin') {
$this->msg .= 'error§' . _('Sie haben keine Berechtigung <em>>Admin-Accounts</em> anzulegen.') . '§'; $this->msg .= 'error§' . _('Sie haben keine Berechtigung, <em>Admin-Accounts</em> anzulegen.') . '§';
return false; return false;
} }
if (!$perm->have_perm('root') && $newuser['auth_user_md5.perms'] === 'root') { if (!$perm->have_perm('root') && $newuser['auth_user_md5.perms'] === 'root') {
$this->msg .= 'error§' . _('Sie haben keine Berechtigung <em>Root-Accounts</em> anzulegen.') . '§'; $this->msg .= 'error§' . _('Sie haben keine Berechtigung, <em>Root-Accounts</em> anzulegen.') . '§';
return false; return false;
} }
...@@ -705,9 +705,8 @@ class UserManagement ...@@ -705,9 +705,8 @@ class UserManagement
); );
} else } else
// admin and root cannot reset their password via mail
// only users with auth-type standard cann reset their password // only users with auth-type standard cann reset their password
if ($user->perms == 'root' || $user->perms == 'admin' || $user->auth_plugin !== 'standard') { if ($user->auth_plugin !== 'standard') {
// inform user, that their password cannot be reset via mail // inform user, that their password cannot be reset via mail
$subject = sprintf( $subject = sprintf(
...@@ -725,7 +724,6 @@ class UserManagement ...@@ -725,7 +724,6 @@ class UserManagement
. "Wenden sie sich bitte stattdessen an\n%s" . "Wenden sie sich bitte stattdessen an\n%s"
), ),
Config::get()->UNI_NAME_CLEAN, Config::get()->UNI_NAME_CLEAN,
$user->username,
$GLOBALS['UNI_CONTACT'] $GLOBALS['UNI_CONTACT']
); );
......
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