This commit is contained in:
skeeter 2002-09-02 02:32:10 +00:00
parent 1a3b302466
commit 40df324cf5
4 changed files with 26 additions and 14 deletions

View File

@ -454,14 +454,14 @@
function get_type($accountid = '')
{
if(isset($this->account_type))
static $account_type;
$account_id = get_account_id($accountid);
if (isset($this->account_type) && $account_id == $this->account_id)
{
return $this->account_type;
}
static $account_type;
$account_id = get_account_id($accountid);
if(@isset($account_type[$account_id]) && @$account_type[$account_id])
{
return $account_type[$account_id];
@ -835,4 +835,4 @@
return $allValues[0]['dn'];
}
}
}

View File

@ -228,8 +228,17 @@
function get_type($accountid)
{
static $account_type;
$account_id = get_account_id($accountid);
if (isset($this->account_type) && $account_id == $this->account_id)
{
return $this->account_type;
}
elseif($account_id == '')
{
return False;
}
if(@isset($account_type[$account_id]) && @$account_type[$account_id])
{
return $account_type[$account_id];
@ -422,4 +431,4 @@
}
/*!
@class_end accounts
*/
*/

View File

@ -330,13 +330,13 @@
return False;
}
if (! $GLOBALS['phpgw']->auth->authenticate($this->account_lid, $this->passwd, $this->passwd_type) || $GLOBALS['phpgw']->accounts->get_type($this->account_lid) == 'g')
if ((!$GLOBALS['phpgw']->auth->authenticate($this->account_lid, $this->passwd, $this->passwd_type)) || $GLOBALS['phpgw']->accounts->get_type($this->account_lid) == 'g')
{
return False;
exit;
}
if (!$GLOBALS['phpgw']->accounts->exists($this->account_lid) && $GLOBALS['phpgw_info']['server']['auto_create_acct'] == True)
if ((!$GLOBALS['phpgw']->accounts->exists($this->account_lid)) && $GLOBALS['phpgw_info']['server']['auto_create_acct'] == True)
{
$this->account_id = $GLOBALS['phpgw']->accounts->auto_add($this->account_lid, $passwd);
}
@ -633,7 +633,7 @@
function update_dla()
{
global $PHP_SELF;
if(MENUACTION)
if(defined('MENUACTION'))
{
$action = MENUACTION;
}
@ -973,6 +973,7 @@
/* and return the result */
if (is_array($extravars))
{
$new_extravars = '';
reset($extravars);
while(list($key,$value) = each($extravars))
{
@ -983,13 +984,16 @@
$new_extravars .= $key.'='.htmlentities(urlencode($value));
}
/* This needs to be explictly reset to a string variable type for PHP3 */
/*
settype($extravars,'string');
$extravars = $new_extravars;
unset($new_extravars);
return $url .= '?' . $extravars;
*/
return $url .= '?' . $new_extravars;
}
/* if no extravars then we return the cleaned up url/scriptname */
return $url;
}
}
?>
?>

View File

@ -313,13 +313,13 @@
return False;
}
if (! $GLOBALS['phpgw']->auth->authenticate($this->account_lid, $this->passwd, $this->passwd_type) || $GLOBALS['phpgw']->accounts->get_type($this->account_lid) == 'g')
if ((!$GLOBALS['phpgw']->auth->authenticate($this->account_lid, $this->passwd, $this->passwd_type)) || $GLOBALS['phpgw']->accounts->get_type($this->account_lid) == 'g')
{
return False;
exit;
}
if (!$GLOBALS['phpgw']->accounts->exists($this->account_lid) && $GLOBALS['phpgw_info']['server']['auto_create_acct'] == True)
if ((!$GLOBALS['phpgw']->accounts->exists($this->account_lid)) && $GLOBALS['phpgw_info']['server']['auto_create_acct'] == True)
{
$this->account_id = $GLOBALS['phpgw']->accounts->auto_add($this->account_lid, $passwd);
}
@ -954,4 +954,3 @@
return $url;
}
}