mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 13:09:21 +03:00
Nextcloud extension added: fetch user email address for login screen
This commit is contained in:
parent
46bd6d4564
commit
bd21c98179
1 changed files with 8 additions and 3 deletions
|
|
@ -4,8 +4,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
{
|
||||
const
|
||||
NAME = 'Nextcloud',
|
||||
VERSION = '2.32',
|
||||
RELEASE = '2024-03-12',
|
||||
VERSION = '2.33',
|
||||
RELEASE = '2024-03-14',
|
||||
CATEGORY = 'Integrations',
|
||||
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
||||
REQUIRED = '2.35.3';
|
||||
|
|
@ -199,7 +199,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
public function FilterAppData($bAdmin, &$aResult) : void
|
||||
{
|
||||
if (!$bAdmin && \is_array($aResult)) {
|
||||
$sUID = \OC::$server->getUserSession()->getUser()->getUID();
|
||||
$ocUser = \OC::$server->getUserSession()->getUser();
|
||||
$sUID = $ocUser->getUID();
|
||||
$oUrlGen = \OC::$server->getURLGenerator();
|
||||
$sWebDAV = $oUrlGen->getAbsoluteURL($oUrlGen->linkTo('', 'remote.php') . '/dav');
|
||||
// $sWebDAV = \OCP\Util::linkToRemote('dav');
|
||||
|
|
@ -227,6 +228,10 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
if ($sCustomEmail) {
|
||||
$sEmail = $sCustomEmail;
|
||||
}
|
||||
if (!$sEmail) {
|
||||
$sEmail = $ocUser->getEMailAddress();
|
||||
// ?: $oc->user->getPrimaryEMailAddress();
|
||||
}
|
||||
/*
|
||||
if ($config->getAppValue('snappymail', 'snappymail-autologin-oidc', false)) {
|
||||
if (\OC::$server->getSession()->get('is_oidc')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue