mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 08:57:03 +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
|
const
|
||||||
NAME = 'Nextcloud',
|
NAME = 'Nextcloud',
|
||||||
VERSION = '2.32',
|
VERSION = '2.33',
|
||||||
RELEASE = '2024-03-12',
|
RELEASE = '2024-03-14',
|
||||||
CATEGORY = 'Integrations',
|
CATEGORY = 'Integrations',
|
||||||
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
||||||
REQUIRED = '2.35.3';
|
REQUIRED = '2.35.3';
|
||||||
|
|
@ -199,7 +199,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
public function FilterAppData($bAdmin, &$aResult) : void
|
public function FilterAppData($bAdmin, &$aResult) : void
|
||||||
{
|
{
|
||||||
if (!$bAdmin && \is_array($aResult)) {
|
if (!$bAdmin && \is_array($aResult)) {
|
||||||
$sUID = \OC::$server->getUserSession()->getUser()->getUID();
|
$ocUser = \OC::$server->getUserSession()->getUser();
|
||||||
|
$sUID = $ocUser->getUID();
|
||||||
$oUrlGen = \OC::$server->getURLGenerator();
|
$oUrlGen = \OC::$server->getURLGenerator();
|
||||||
$sWebDAV = $oUrlGen->getAbsoluteURL($oUrlGen->linkTo('', 'remote.php') . '/dav');
|
$sWebDAV = $oUrlGen->getAbsoluteURL($oUrlGen->linkTo('', 'remote.php') . '/dav');
|
||||||
// $sWebDAV = \OCP\Util::linkToRemote('dav');
|
// $sWebDAV = \OCP\Util::linkToRemote('dav');
|
||||||
|
|
@ -227,6 +228,10 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
if ($sCustomEmail) {
|
if ($sCustomEmail) {
|
||||||
$sEmail = $sCustomEmail;
|
$sEmail = $sCustomEmail;
|
||||||
}
|
}
|
||||||
|
if (!$sEmail) {
|
||||||
|
$sEmail = $ocUser->getEMailAddress();
|
||||||
|
// ?: $oc->user->getPrimaryEMailAddress();
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
if ($config->getAppValue('snappymail', 'snappymail-autologin-oidc', false)) {
|
if ($config->getAppValue('snappymail', 'snappymail-autologin-oidc', false)) {
|
||||||
if (\OC::$server->getSession()->get('is_oidc')) {
|
if (\OC::$server->getSession()->get('is_oidc')) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue