mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 11:09:20 +03:00
This might solve #1420 ?
This commit is contained in:
parent
5e0d52b9e7
commit
8948d22095
1 changed files with 9 additions and 1 deletions
|
|
@ -126,10 +126,18 @@ class SnappyMailHelper
|
|||
|
||||
public static function getLoginCredentials() : array
|
||||
{
|
||||
$sUID = \OC::$server->getUserSession()->getUser()->getUID();
|
||||
|
||||
if (\OC::$server->getSession()->get('is_oidc')) {
|
||||
$sAccessToken = \OC::$server->getSession()->get('oidc_access_token');
|
||||
if ($sAccessToken) {
|
||||
return [$sUID, "oidc@nextcloud", $sAccessToken];
|
||||
}
|
||||
}
|
||||
|
||||
$sEmail = '';
|
||||
$sPassword = '';
|
||||
$config = \OC::$server->getConfig();
|
||||
$sUID = \OC::$server->getUserSession()->getUser()->getUID();
|
||||
$ocSession = \OC::$server->getSession();
|
||||
// Only use the user's password in the current session if they have
|
||||
// enabled auto-login using Nextcloud username or email address.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue