fix for reported bug by stylite-> default Identity was not longer selectable in compose, when switched to user defined account

This commit is contained in:
Klaus Leithoff 2009-10-07 14:43:11 +00:00
parent e851fc0b58
commit fe212f2d95

View File

@ -230,21 +230,38 @@
// replace the global defined identity
if(is_a($accountData['identity'],'ea_identity')) {
//_debug_array($profileData);
$rememberIdentities = $profileData->identities;
$profileData->setIdentity($accountData['identity'],0);
$rememberID = $accountData['identity']->id;
}
}
}
if($profileData->userDefinedIdentities && $GLOBALS['egw_info']['user']['apps']['felamimail']) {
if($profileData->userDefinedIdentities && $GLOBALS['egw_info']['user']['apps']['felamimail'])
{
$allUserIdentities = $this->getUserDefinedIdentities();
if (is_array($allUserIdentities)) {
if (is_array($allUserIdentities))
{
$i=count($allUserIdentities);
$y=-1;
foreach ($allUserIdentities as $tmpkey => $id)
{
if ($id->id != $rememberID) {
if ($id->id != $rememberID)
{
$profileData->setIdentity($id,$i);
$i++;
}
else
{
foreach ($rememberIdentities as $adkey => $ident)
{
$profileData->setIdentity($ident,$i);
$profileData->identities[$i]->default = false;
$profileData->identities[$i]->id = $y;
$i++;
$y--;
}
}
}
}
}