mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
parent
e82108ac85
commit
4a47796781
29 changed files with 724 additions and 195 deletions
39
build/owncloud/rainloop-app/personal.php
Normal file
39
build/owncloud/rainloop-app/personal.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - RainLoop mail plugin
|
||||
*
|
||||
* @author RainLoop Team
|
||||
* @copyright 2014 RainLoop Team
|
||||
*
|
||||
* https://github.com/RainLoop/rainloop-webmail/tree/master/build/owncloud
|
||||
*/
|
||||
|
||||
OCP\User::checkLoggedIn();
|
||||
OCP\App::checkAppEnabled('rainloop');
|
||||
|
||||
OCP\Util::addScript('rainloop', 'personal');
|
||||
|
||||
$sUrl = trim(OCP\Config::getAppValue('rainloop', 'rainloop-url', ''));
|
||||
$sSsoKey = trim(OCP\Config::getAppValue('rainloop', 'rainloop-sso-key', ''));
|
||||
|
||||
if ('' === $sUrl || '' === $sSsoKey)
|
||||
{
|
||||
$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', '');
|
||||
|
||||
$oTemplate->assign('rainloop-email', $sEmail);
|
||||
$oTemplate->assign('rainloop-login', OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-login', ''));
|
||||
|
||||
$sPass = OCP\Config::getUserValue($sUser, 'rainloop', 'rainloop-password', '');
|
||||
$oTemplate->assign('rainloop-password', 0 === strlen($sPass) && 0 === strlen($sEmail) ? '' : '******');
|
||||
}
|
||||
|
||||
return $oTemplate->fetchPage();
|
||||
Loading…
Add table
Add a link
Reference in a new issue