fix some warnings / notices in session creation

This commit is contained in:
ralf 2023-02-03 09:57:37 +01:00
parent 4f0e65c1a5
commit 4b342db97e
2 changed files with 3 additions and 3 deletions

View File

@ -513,7 +513,7 @@ class Session
}
if (($blocked = $this->login_blocked($login,$user_ip)) || // too many unsuccessful attempts
$GLOBALS['egw_info']['server']['global_denied_users'][$this->account_lid] ||
!empty($GLOBALS['egw_info']['server']['global_denied_users'][$this->account_lid]) ||
$auth_check && !$GLOBALS['egw']->auth->authenticate($this->account_lid, $this->passwd, $this->passwd_type) ||
$this->account_id && $GLOBALS['egw']->accounts->get_type($this->account_id) == 'g')
{
@ -547,7 +547,7 @@ class Session
$GLOBALS['egw_info']['user']['account_id'] = $this->account_id;
// for *DAV and eSync we use a pseudo sessionid created from md5(user:passwd)
// --> allows this stateless protocolls which use basic auth to use sessions!
// --> allows this stateless protocols which use basic auth to use sessions!
if (($this->sessionid = self::get_sessionid(true)))
{
if (session_status() !== PHP_SESSION_ACTIVE) // gives warning including password

View File

@ -228,7 +228,7 @@ else
}
}
$GLOBALS['sessionid'] = $GLOBALS['egw']->session->create($login, $passwd,
$passwd_type, false, true, true, $_POST['2fa_code'], $_POST['remember_me']); // true = let session fail on forced password change
$passwd_type, false, true, true, $_POST['2fa_code'] ?? null, $_POST['remember_me'] ?? null); // true = let session fail on forced password change
if (!$GLOBALS['sessionid'] && $GLOBALS['egw']->session->cd_reason == Api\Session::CD_FORCE_PASSWORD_CHANGE)
{