mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
use different method to determine the default/Global profile for the current User
This commit is contained in:
parent
e861c2e0ed
commit
42660ddfa1
@ -158,11 +158,11 @@ class felamimail_activesync implements activesync_plugin_write, activesync_plugi
|
||||
$identities = array();
|
||||
if (!isset($params['setup']))
|
||||
{
|
||||
if (!$this->mail) $this->mail = felamimail_bo::getInstance(true,(self::$profileID=='G'?0:self::$profileID));
|
||||
if (!$this->mail) $this->mail = felamimail_bo::getInstance(true,(self::$profileID=='G'?emailadmin_bo::getUserDefaultProfileID():self::$profileID));
|
||||
$selectedID = $this->mail->getIdentitiesWithAccounts($identities);
|
||||
if (self::$profileID=='G')
|
||||
{
|
||||
if (is_object($this->mail->mailPreferences)) $activeIdentity =& $this->mail->mailPreferences->getIdentity(0);
|
||||
if (is_object($this->mail->mailPreferences)) $activeIdentity =& $this->mail->mailPreferences->getIdentity(emailadmin_bo::getUserDefaultProfileID());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -169,9 +169,10 @@ class felamimail_bo
|
||||
{
|
||||
if ($_profileID == 0)
|
||||
{
|
||||
$profileID = emailadmin_bo::getDefaultProfileID();
|
||||
$profileID = emailadmin_bo::getUserDefaultProfileID();
|
||||
if ($profileID!=$_profileID) $_restoreSession==false;
|
||||
$_profileID=$profileID;
|
||||
error_log(__METHOD__.__LINE__.' called with profileID==0 using '.$profileID.' instead->'.function_backtrace());
|
||||
}
|
||||
if ($_profileID != 0 && $_validate)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user