Release commit

This commit is contained in:
RainLoop Team 2015-02-15 04:30:21 +04:00
parent 86f855fa5b
commit b01f298b7b
13 changed files with 121 additions and 42 deletions

View file

@ -17,10 +17,11 @@ OCP\App::registerPersonal('rainloop', 'personal');
if (OCP\Config::getAppValue('rainloop', 'rainloop-autologin', false))
{
OCP\Util::connectHook('OC_User', 'post_login', 'OC_RainLoop_Helper', 'login');
OCP\Util::connectHook('OC_User', 'logout', 'OC_RainLoop_Helper', 'logout');
OCP\Util::connectHook('OC_User', 'post_setPassword', 'OC_RainLoop_Helper', 'changePassword');
}
OCP\Util::connectHook('OC_User', 'logout', 'OC_RainLoop_Helper', 'logout');
OCP\Util::addScript('rainloop', 'rainloop');
OCP\App::addNavigationEntry(array(

View file

@ -110,8 +110,24 @@ class OC_RainLoop_Helper
public static function logout()
{
return OCP\Config::setUserValue(
OCP\Config::setUserValue(
OCP\User::getUser(), 'rainloop', 'rainloop-autologin-password', '');
$sApiPath = __DIR__.'/../app/index.php';
if (file_exists($sApiPath))
{
self::regRainLoopDataFunction();
$_ENV['RAINLOOP_INCLUDE_AS_API'] = true;
include $sApiPath;
if (class_exists('\\RainLoop\\Api'))
{
\RainLoop\Api::LogoutCurrentLogginedUser();
}
}
return true;
}
public static function changePassword($aParams)