From 91ff43e6ab00c5ff987170d54a41326ad1e3b450 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 11 Nov 2024 23:57:41 +0100 Subject: [PATCH] Resolve #1828 --- dev/Settings/Admin/Domains.js | 4 ++-- .../v/0.0.0/app/libraries/RainLoop/Actions/AdminDomains.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dev/Settings/Admin/Domains.js b/dev/Settings/Admin/Domains.js index 80fc9bff4..1a769bb14 100644 --- a/dev/Settings/Admin/Domains.js +++ b/dev/Settings/Admin/Domains.js @@ -18,8 +18,8 @@ export class AdminSettingsDomains /*extends AbstractViewSettings*/ { testUsername() { Remote.request('AdminDomainMatch', (iError, oData) => { - if (oData?.Result?.domain) { - alert(`${oData.Result.email} matched domain: ${oData.Result.domain.name}`); + if (oData?.Result?.name) { + alert(`${oData.Result.email} matched domain: ${oData.Result.name}`); } else { alert('No domain match'); } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/AdminDomains.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/AdminDomains.php index e8579308f..bb037054b 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/AdminDomains.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/AdminDomains.php @@ -71,7 +71,8 @@ trait AdminDomains return $this->DefaultResponse(array( 'email' => $sEmail, 'login' => $sCredentials['imapUser'], - 'domain' => $sCredentials['domain'], + 'name' => $sCredentials['domain'] ? $sCredentials['domain']->Name() : null, +// 'domain' => $sCredentials['domain'], 'whitelist' => $sCredentials['domain'] ? $sCredentials['domain']->ValidateWhiteList($sEmail) : null )); }