mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
avoid misconfiguration of user "anonymous" NOT flaged as such
This commit is contained in:
parent
34ec346821
commit
e9c3533c93
@ -104,7 +104,10 @@ 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);
|
||||
$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';
|
||||
|
||||
if ($data['mustchangepassword'] && $data['changepassword'])
|
||||
{
|
||||
$data['account_lastpwd_change']=0;
|
||||
|
@ -482,7 +482,8 @@ class Sharing
|
||||
// sharing is for a different share, change to current share
|
||||
if ($this->share['share_token'] !== self::get_token())
|
||||
{
|
||||
self::create_session($GLOBALS['egw']->session->session_flags === 'N');
|
||||
self::create_session($GLOBALS['egw']->session->session_flags === 'N' ||
|
||||
$GLOBALS['egw_info']['user']['account_lid'] === 'anonymous');
|
||||
|
||||
return $GLOBALS['egw']->sharing->ServeRequest();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user