diff options
author | Brice Maron <brice@bmaron.net> | 2012-06-21 17:15:35 +0000 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-06-21 17:15:35 +0000 |
commit | e5c56b2433b1987e4b6b8020e01f4da03623c4b8 (patch) | |
tree | a650870f7bbc497833b8ea00051f9046e1779f5e /lib/user.php | |
parent | df83df5263db57056d0bd70edfa3b28e7b5e6b6b (diff) | |
parent | 6707e4187e4c1186eff8dfe06999c4539ab80de7 (diff) | |
download | nextcloud-server-e5c56b2433b1987e4b6b8020e01f4da03623c4b8.tar.gz nextcloud-server-e5c56b2433b1987e4b6b8020e01f4da03623c4b8.zip |
Merge branch 'master' into multi_app_dir
Conflicts:
lib/app.php
lib/base.php
lib/minimizer/css.php
lib/minimizer/js.php
lib/template.php
lib/util.php
Diffstat (limited to 'lib/user.php')
-rw-r--r-- | lib/user.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/user.php b/lib/user.php index f1903093d6d..23b88aa1d06 100644 --- a/lib/user.php +++ b/lib/user.php @@ -240,13 +240,17 @@ class OC_User { * Checks if the user is logged in */ public static function isLoggedIn(){ + static $is_login_checked = null; + if (!is_null($is_login_checked)) { + return $is_login_checked; + } if( isset($_SESSION['user_id']) AND $_SESSION['user_id']) { OC_App::loadApps(array('authentication')); if (self::userExists($_SESSION['user_id']) ){ - return true; + return $is_login_checked = true; } } - return false; + return $is_login_checked = false; } /** |