fix to allow setting "anonymous" flag for other accounts and try to fix Chrome autocomplete

This commit is contained in:
Ralf Becker 2020-03-21 14:38:32 +01:00
parent e9c3533c93
commit f0f4fd2ee3
2 changed files with 5 additions and 5 deletions

View File

@ -104,9 +104,9 @@ class admin_cmd_edit_user extends admin_cmd_change_pw
}
$data['changepassword'] = admin_cmd::parse_boolean($data['changepassword'],$this->account ? null : true);
$data['anonymous'] = admin_cmd::parse_boolean($data['anonymous'],$this->account ? null : false) ||
// automatic set anonymous flag for username "anonymous", to not allow to create anonymous user without it
($data['account_lid'] ?: admin_cmd::$accounts->id2name($this->account)) === 'anonymous';
$data['anonymous'] = ($data['account_lid'] ?: admin_cmd::$accounts->id2name($this->account)) === 'anonymous' ?
true : admin_cmd::parse_boolean($data['anonymous'],$this->account ? null : false);
if ($data['mustchangepassword'] && $data['changepassword'])
{

View File

@ -15,7 +15,7 @@
<rows>
<row>
<description value="Login ID" for="account_lid"/>
<textbox id="account_lid" class="et2_fullWidth" onchange="app.addressbook.account_change" needed="true"/>
<textbox id="account_lid" class="et2_fullWidth" onchange="app.addressbook.account_change" needed="true" autocomplete="new-username"/>
<description/>
<description value="Expires" for="account_expires"/>
<hbox>
@ -26,7 +26,7 @@
</row>
<row>
<description value="Password" for="account_passwd"/>
<passwd id="account_passwd" class="et2_fullWidth" onchange="app.addressbook.account_change"/>
<passwd id="account_passwdx" class="et2_fullWidth" onchange="app.addressbook.account_change" autocomplete="new-password"/>
<description/>
<description value="Re-enter password" for="account_passwd_2"/>
<passwd id="account_passwd_2" class="et2_fullWidth" onchange="app.addressbook.account_change"/>