forked from vijaydwivedics/rainloop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
personal.php
33 lines (25 loc) · 870 Bytes
/
personal.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Nextcloud - RainLoop mail plugin
*
* @author RainLoop Team
* @copyright 2016 RainLoop Team
*
* https://github.com/RainLoop/rainloop-webmail/tree/master/build/owncloud
*/
OCP\User::checkLoggedIn();
OCP\Util::addScript('rainloop', 'personal');
if (OCP\Config::getAppValue('rainloop', 'rainloop-autologin', false))
{
$oTemplate = new OCP\Template('rainloop', 'empty');
}
else
{
$sUser = OCP\User::getUser();
$oTemplate = new OCP\Template('rainloop', 'personal');
$sEmail = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-email', '');
$sPass = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-password', '');
$oTemplate->assign('rainloop-email', $sEmail);
$oTemplate->assign('rainloop-password', 0 === strlen($sPass) && 0 === strlen($sEmail) ? '' : '******');
}
return $oTemplate->fetchPage();