mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Bugfix: when allowMultipleIdentities is false always return primaryIdentity
This commit is contained in:
parent
6ae38bfe1b
commit
dff89ea4e0
2 changed files with 6 additions and 4 deletions
|
|
@ -43,8 +43,8 @@ class Identity implements \JsonSerializable
|
|||
|
||||
function __construct(string $sId = '', string $sEmail = '')
|
||||
{
|
||||
$this->sId = empty($sId) ? '' : $sId;
|
||||
$this->sEmail = empty($sEmail) ? '' : $sEmail;
|
||||
$this->sId = $sId;
|
||||
$this->sEmail = $sEmail;
|
||||
$this->sName = '';
|
||||
$this->sReplyTo = '';
|
||||
$this->sBcc = '';
|
||||
|
|
|
|||
|
|
@ -43,8 +43,10 @@ class Identities extends AbstractProvider
|
|||
}));
|
||||
|
||||
// If no primary identity is found, generate default one from account info
|
||||
if ($primaryIdentity === null || $primaryIdentity === false)
|
||||
$identities[] = $primaryIdentity = new Identity('', $account->Email());
|
||||
if ($primaryIdentity === null || $primaryIdentity === false) {
|
||||
$primaryIdentity = $primaryIdentity = new Identity('', $account->Email());
|
||||
$identities[] = $primaryIdentity;
|
||||
}
|
||||
|
||||
// Return only primary identity or all identities
|
||||
return $allowMultipleIdentities ? $identities : [$primaryIdentity];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue