Check that preferences is an object (for use from setup)

This commit is contained in:
Miles Lott 2002-01-03 22:02:13 +00:00
parent 5f5f24e2ae
commit 3279692e7a
2 changed files with 2 additions and 2 deletions

View File

@ -689,7 +689,7 @@
}
/* print ldap_error($this->ds); */
if($account_id)
if($account_id && is_object($GLOBALS['phpgw']->preferences))
{
$GLOBALS['phpgw']->preferences->create_defaults($account_id);
return $account_id;

View File

@ -290,7 +290,7 @@
. "','" . $account_info['account_expires'] . "')",__LINE__,__FILE__);
$accountid = $this->db->get_last_insert_id('phpgw_accounts','account_id');
if($accountid)
if($accountid && is_object($GLOBALS['phpgw']->preferences))
{
$GLOBALS['phpgw']->preferences->create_defaults($accountid);
return $accountid;