ported isLoggedIn

This commit is contained in:
Frank Karlitschek 2012-05-01 18:46:15 +02:00
parent d0554bef06
commit 5bf69237b2
3 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
if(!OC_USER::isLoggedIn()) {
if(!OCP\User::isLoggedIn()) {
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
OC_JSON::checkAppEnabled('calendar');

View File

@ -8,7 +8,7 @@
if(!OC_USER::isLoggedIn()) {
if(!OCP\User::isLoggedIn()) {
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
OC_JSON::checkAppEnabled('calendar');

View File

@ -10,7 +10,7 @@ OC_Hook::connect('OC_User','post_login','OC_Crypt','loginListener');
stream_wrapper_register('crypt','OC_CryptStream');
if(!isset($_SESSION['enckey']) and OC_User::isLoggedIn()){//force the user to re-loggin if the encryption key isn't unlocked (happens when a user is logged in before the encryption app is enabled)
if(!isset($_SESSION['enckey']) and OCP\User::isLoggedIn()){//force the user to re-loggin if the encryption key isn't unlocked (happens when a user is logged in before the encryption app is enabled)
OC_User::logout();
header("Location: ".OC::$WEBROOT.'/');
exit();