This commit is contained in:
the-djmaze
2024-04-28 14:03:34 +02:00
parent f4e81a183e
commit 9ec8ac8bba

View File

@@ -87,9 +87,9 @@ trait Accounts
if ($bNew || \strlen($oPassword)) {
$oNewAccount = $this->LoginProcess($sEmail, $oPassword, false);
$sEmail = $oNewAccount->Email();
$aAccounts[$sEmail] = $oNewAccount->asTokenArray($oMainAccount);
$aAccount = $oNewAccount->asTokenArray($oMainAccount);
} else {
$aAccounts[$sEmail] = \RainLoop\Model\AdditionalAccount::convertArray($aAccounts[$sEmail]);
$aAccount = \RainLoop\Model\AdditionalAccount::convertArray($aAccounts[$sEmail]);
}
if ($bNew) {
@@ -100,6 +100,8 @@ trait Accounts
throw new ClientException(Notifications::AccountDoesNotExist);
}
$aAccounts[$sEmail] = $aAccount;
if ($aAccounts[$sEmail]) {
$aAccounts[$sEmail]['name'] = \trim($this->GetActionParam('name', ''));
$this->SetAccounts($oMainAccount, $aAccounts);