forked from extern/egroupware
no need to call accounts class, if we have no id
This commit is contained in:
parent
81dd3cc41f
commit
c3f1e887c5
@ -786,7 +786,7 @@ class Accounts
|
||||
*/
|
||||
function exists($account_id)
|
||||
{
|
||||
if (!($data = $this->read($account_id)))
|
||||
if (!$account_id || !($data = $this->read($account_id)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ function get_account_id($account_id = '',$default_id = '')
|
||||
}
|
||||
elseif (is_string($account_id))
|
||||
{
|
||||
if($GLOBALS['egw']->accounts->exists((int)$account_id) == True)
|
||||
if((int)$account_id && $GLOBALS['egw']->accounts->exists((int)$account_id) == True)
|
||||
{
|
||||
return (int)$account_id;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user