From ad48945359784948163d732e8fc011bf16608931 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 14 Nov 2003 17:43:49 +0000 Subject: [PATCH] fix for multidomain-install without domain-selectbox --- phpgwapi/inc/class.sessions.inc.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/phpgwapi/inc/class.sessions.inc.php b/phpgwapi/inc/class.sessions.inc.php index acf17f8c97..99439c3680 100644 --- a/phpgwapi/inc/class.sessions.inc.php +++ b/phpgwapi/inc/class.sessions.inc.php @@ -247,7 +247,8 @@ function split_login_domain($both,&$login,&$domain) { $parts = explode('@',$both); - $domain = array_pop($parts); + $domain = count($parts) > 1 ? array_pop($parts) : + $GLOBALS['phpgw_info']['server']['default_domain']; $login = implode('@',$parts); } @@ -286,11 +287,6 @@ $this->split_login_domain($session['session_lid'],$this->account_lid,$this->account_domain); - if ($this->account_domain == '') - { - $this->account_domain = $GLOBALS['phpgw_info']['server']['default_domain']; - } - $GLOBALS['phpgw_info']['user']['kp3'] = $this->kp3; $this->update_dla(); @@ -507,17 +503,12 @@ $now = time(); - if (strstr($login,'@') === False) - { - $this->account_domain = $GLOBALS['phpgw_info']['server']['default_domain']; - } - //echo "

session::create(login='$login'): lid='$this->account_lid', domain='$this->account_domain'

\n"; $user_ip = $this->getuser_ip(); if (($blocked = $this->login_blocked($login,$user_ip)) || // too many unsuccessful attempts $GLOBALS['phpgw_info']['server']['global_denied_users'][$this->account_lid] || - !$GLOBALS['phpgw']->auth->authenticate($this->account_lid, $this->passwd, $this->passwd_type) || + !$GLOBALS['phpgw']->auth->authenticate($this->account_lid, $this->passwd, $this->passwd_type) || $GLOBALS['phpgw']->accounts->get_type($this->account_lid) == 'g') { $this->reason = $blocked ? 'blocked, too many attempts' : 'bad login or password';