mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 18:03:39 +01:00
* EMail(Admin) changing back from a user-defined account to default account is working again
after revert r35821: problem before seems to be that key of provile is -1 while key of icServer is 0 ...
This commit is contained in:
parent
c918ab6260
commit
8f1d323935
@ -717,19 +717,13 @@ class emailadmin_bo extends so_sql
|
||||
|
||||
foreach($ogServer->getAccountEmailAddress($GLOBALS['egw_info']['user']['account_lid']) as $emailAddresses)
|
||||
{
|
||||
// as we map the identities to ids, and use the first one to idetify the identity of the mainProfile
|
||||
// we should take care that our mapping index does not interfere with the profileID
|
||||
if ($i==$data['profileID']) $i++;
|
||||
$identity = CreateObject('emailadmin.ea_identity');
|
||||
$identity->emailAddress = $emailAddresses['address'];
|
||||
$identity->realName = $emailAddresses['name'];
|
||||
$identity->default = ($emailAddresses['type'] == 'default');
|
||||
$identity->organization = $data['organisationName'];
|
||||
$identity->id = ($i==0?$data['profileID']*-1:$i*-1);
|
||||
// first identity found will be associated with the profileID,
|
||||
// others will be set to a negative value, to indicate that they belong to the account
|
||||
$eaPreferences->setIdentity($identity,($i==0?$data['profileID']*-1:$i*-1));
|
||||
$i++;
|
||||
|
||||
$eaPreferences->setIdentity($identity);
|
||||
}
|
||||
|
||||
$eaPreferences->userDefinedAccounts = ($data['userDefinedAccounts'] == 'yes');
|
||||
|
Loading…
Reference in New Issue
Block a user