mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: Nextcloud login failed due to undefined email address
This commit is contained in:
parent
ab2f646496
commit
69cd876895
1 changed files with 4 additions and 4 deletions
|
|
@ -4,8 +4,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = 'Nextcloud',
|
NAME = 'Nextcloud',
|
||||||
VERSION = '2.36',
|
VERSION = '2.36.1',
|
||||||
RELEASE = '2024-05-26',
|
RELEASE = '2024-05-27',
|
||||||
CATEGORY = 'Integrations',
|
CATEGORY = 'Integrations',
|
||||||
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
||||||
REQUIRED = '2.36.2';
|
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
|
public function loginCredentials(string &$sEmail, string &$sLogin, ?string &$sPassword = null) : void
|
||||||
{
|
{
|
||||||
$ocUser = \OC::$server->getUserSession()->getUser();
|
$ocUser = \OC::$server->getUserSession()->getUser();
|
||||||
$sEmail = $ocUser->getEMailAddress() ?: $ocUser->getPrimaryEMailAddress();
|
$sEmail = $ocUser->getEMailAddress() ?: $ocUser->getPrimaryEMailAddress() ?: $sEmail;
|
||||||
$sLogin = $ocUser->getUID();
|
$sLogin = $ocUser->getUID();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loginCredentials2(string &$sEmail, ?string &$sPassword = null) : void
|
public function loginCredentials2(string &$sEmail, ?string &$sPassword = null) : void
|
||||||
{
|
{
|
||||||
$ocUser = \OC::$server->getUserSession()->getUser();
|
$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
|
public function beforeLogin(\RainLoop\Model\Account $oAccount, \MailSo\Net\NetClient $oClient, \MailSo\Net\ConnectSettings $oSettings) : void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue