2014-08-12 00:31:28 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ownCloud - RainLoop mail plugin
|
|
|
|
*
|
|
|
|
* @author RainLoop Team
|
2015-02-12 05:39:27 +08:00
|
|
|
* @copyright 2015 RainLoop Team
|
2014-08-12 00:31:28 +08:00
|
|
|
*
|
|
|
|
* https://github.com/RainLoop/rainloop-webmail/tree/master/build/owncloud
|
|
|
|
*/
|
|
|
|
|
|
|
|
OCP\User::checkLoggedIn();
|
|
|
|
OCP\App::checkAppEnabled('rainloop');
|
|
|
|
|
|
|
|
OCP\Util::addScript('rainloop', 'personal');
|
|
|
|
|
2015-02-12 14:35:31 +08:00
|
|
|
if (OCP\Config::getAppValue('rainloop', 'rainloop-autologin', false))
|
2014-08-12 00:31:28 +08:00
|
|
|
{
|
|
|
|
$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();
|