mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-18 11:21:23 +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)
|
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 = CreateObject('emailadmin.ea_identity');
|
||||||
$identity->emailAddress = $emailAddresses['address'];
|
$identity->emailAddress = $emailAddresses['address'];
|
||||||
$identity->realName = $emailAddresses['name'];
|
$identity->realName = $emailAddresses['name'];
|
||||||
$identity->default = ($emailAddresses['type'] == 'default');
|
$identity->default = ($emailAddresses['type'] == 'default');
|
||||||
$identity->organization = $data['organisationName'];
|
$identity->organization = $data['organisationName'];
|
||||||
$identity->id = ($i==0?$data['profileID']*-1:$i*-1);
|
|
||||||
// first identity found will be associated with the profileID,
|
$eaPreferences->setIdentity($identity);
|
||||||
// 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->userDefinedAccounts = ($data['userDefinedAccounts'] == 'yes');
|
$eaPreferences->userDefinedAccounts = ($data['userDefinedAccounts'] == 'yes');
|
||||||
|
Loading…
Reference in New Issue
Block a user