snappymail/build/owncloud/rainloop-app/personal.php

34 lines
919 B
PHP
Raw Normal View History

2017-02-15 05:06:51 +08:00
<?php
/**
* ownCloud - RainLoop mail plugin
*
* @author RainLoop Team
*
* https://github.com/RainLoop/rainloop-webmail/tree/master/build/owncloud
*/
OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('rainloop');
OCP\Util::addScript('rainloop', 'personal');
2020-04-03 06:34:03 +08:00
if (\OC::$server->getConfig()->getAppValue('rainloop', 'rainloop-autologin', false))
2017-02-15 05:06:51 +08:00
{
$oTemplate = new OCP\Template('rainloop', 'empty');
}
else
{
$sUser = OCP\User::getUser();
$oTemplate = new OCP\Template('rainloop', 'personal');
2020-04-03 06:34:03 +08:00
$sEmail = \OC::$server->getConfig()->getUserValue($sUser, 'rainloop', 'rainloop-email', '');
$sPass = \OC::$server->getConfig()->getUserValue($sUser, 'rainloop', 'rainloop-password', '');
2017-02-15 05:06:51 +08:00
$oTemplate->assign('rainloop-email', $sEmail);
$oTemplate->assign('rainloop-password', 0 === strlen($sPass) && 0 === strlen($sEmail) ? '' : '******');
}
return $oTemplate->fetchPage();