diff --git a/admin/inc/class.uiaccounts.inc.php b/admin/inc/class.uiaccounts.inc.php index e3c9efb165..8d4388b189 100755 --- a/admin/inc/class.uiaccounts.inc.php +++ b/admin/inc/class.uiaccounts.inc.php @@ -1221,6 +1221,7 @@ 'email' => html::input('account_email',$group_repository['account_email'],'',' style="width: 100%;"'), )); } + emailadmin_bo::unsetCachedObjects($default_profile_id); } } $availableApps = $GLOBALS['egw_info']['apps']; diff --git a/felamimail/inc/class.felamimail_bo.inc.php b/felamimail/inc/class.felamimail_bo.inc.php index 8fae5a9136..d4f8c701f6 100644 --- a/felamimail/inc/class.felamimail_bo.inc.php +++ b/felamimail/inc/class.felamimail_bo.inc.php @@ -167,6 +167,12 @@ class felamimail_bo */ public static function getInstance($_restoreSession=true, $_profileID=0, $_validate=true) { + if ($_profileID == 0) + { + $profileID = emailadmin_bo::getDefaultProfileID(); + if ($profileID!=$_profileID) $_restoreSession==false; + $_profileID=$profileID; + } if ($_profileID != 0 && $_validate) { $profileID = self::validateProfileID($_restoreSession, $_profileID); @@ -182,7 +188,7 @@ class felamimail_bo } } //error_log(__METHOD__.__LINE__.' RestoreSession:'.$_restoreSession.' ProfileId:'.$_profileID.' called from:'.function_backtrace()); - if (!isset(self::$instances[$_profileID])) + if (!isset(self::$instances[$_profileID]) || $_restoreSession===false) { self::$instances[$_profileID] = new felamimail_bo('utf-8',$_restoreSession,$_profileID); } @@ -412,7 +418,7 @@ class felamimail_bo * @param int $_profile_id must be a value lower than 0 (emailadmin profile) * @return object instance of felamimail_bo (by reference) */ - public static function &forceEAProfileLoad($_profile_id) + public static function forceEAProfileLoad($_profile_id) { $bofelamimail = felamimail_bo::getInstance(false, $_profile_id,false); //_debug_array( $_profile_id); diff --git a/felamimail/inc/class.felamimail_hooks.inc.php b/felamimail/inc/class.felamimail_hooks.inc.php index 59b1205d1f..bcb1d1b410 100644 --- a/felamimail/inc/class.felamimail_hooks.inc.php +++ b/felamimail/inc/class.felamimail_hooks.inc.php @@ -36,6 +36,7 @@ class felamimail_hooks $bofelamimail->updateAccount($hookData); break; } + emailadmin_bo::unsetCachedObjects($default_profile_id); } }