From 69cd8768953d6ffc82800c34fc08025bd9c47931 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 27 May 2024 10:17:28 +0200 Subject: [PATCH] Bugfix: Nextcloud login failed due to undefined email address --- plugins/nextcloud/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/nextcloud/index.php b/plugins/nextcloud/index.php index 83fdcbdc5..ff955ed8f 100644 --- a/plugins/nextcloud/index.php +++ b/plugins/nextcloud/index.php @@ -4,8 +4,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin { const NAME = 'Nextcloud', - VERSION = '2.36', - RELEASE = '2024-05-26', + VERSION = '2.36.1', + RELEASE = '2024-05-27', CATEGORY = 'Integrations', DESCRIPTION = 'Integrate with Nextcloud v20+', REQUIRED = '2.36.2'; @@ -74,14 +74,14 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin public function loginCredentials(string &$sEmail, string &$sLogin, ?string &$sPassword = null) : void { $ocUser = \OC::$server->getUserSession()->getUser(); - $sEmail = $ocUser->getEMailAddress() ?: $ocUser->getPrimaryEMailAddress(); + $sEmail = $ocUser->getEMailAddress() ?: $ocUser->getPrimaryEMailAddress() ?: $sEmail; $sLogin = $ocUser->getUID(); } public function loginCredentials2(string &$sEmail, ?string &$sPassword = null) : void { $ocUser = \OC::$server->getUserSession()->getUser(); - $sEmail = $ocUser->getEMailAddress() ?: $ocUser->getPrimaryEMailAddress(); + $sEmail = $ocUser->getEMailAddress() ?: $ocUser->getPrimaryEMailAddress() ?: $sEmail; } public function beforeLogin(\RainLoop\Model\Account $oAccount, \MailSo\Net\NetClient $oClient, \MailSo\Net\ConnectSettings $oSettings) : void