From f0f4fd2ee3db957d49f244da5b58f9dcd1bb301c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 21 Mar 2020 14:38:32 +0100 Subject: [PATCH] fix to allow setting "anonymous" flag for other accounts and try to fix Chrome autocomplete --- admin/inc/class.admin_cmd_edit_user.inc.php | 6 +++--- admin/templates/default/account.xet | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/inc/class.admin_cmd_edit_user.inc.php b/admin/inc/class.admin_cmd_edit_user.inc.php index d2be5872cd..db0274c9e7 100644 --- a/admin/inc/class.admin_cmd_edit_user.inc.php +++ b/admin/inc/class.admin_cmd_edit_user.inc.php @@ -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'; + // automatic set anonymous flag for username "anonymous", to not allow to create anonymous user without it + $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']) { diff --git a/admin/templates/default/account.xet b/admin/templates/default/account.xet index af1482af1c..b2557bf126 100644 --- a/admin/templates/default/account.xet +++ b/admin/templates/default/account.xet @@ -15,7 +15,7 @@ - + @@ -26,7 +26,7 @@ - +