summaryrefslogtreecommitdiffstats
path: root/lib/private/user
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-12-16 19:07:14 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-12-17 17:40:52 +0100
commit236632702cf7fe68cc9ad1dcfcc463e0d4c14d64 (patch)
tree17acbbe2628c91836fdf662832cbaa1929f036eb /lib/private/user
parenta641bb75926ba20befe1d4bfb75c4a8025684f69 (diff)
downloadnextcloud-server-236632702cf7fe68cc9ad1dcfcc463e0d4c14d64.tar.gz
nextcloud-server-236632702cf7fe68cc9ad1dcfcc463e0d4c14d64.zip
add a isLoggedIn method to the usersession and deprecate the isLoggedIn method on the api
Diffstat (limited to 'lib/private/user')
-rw-r--r--lib/private/user/session.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/user/session.php b/lib/private/user/session.php
index 277aa1a047e..53662d00952 100644
--- a/lib/private/user/session.php
+++ b/lib/private/user/session.php
@@ -138,6 +138,15 @@ class Session implements IUserSession, Emitter {
}
/**
+ * Checks wether the user is logged in
+ *
+ * @return bool if logged in
+ */
+ public function isLoggedIn() {
+ return $this->getUser() !== null;
+ }
+
+ /**
* set the login name
*
* @param string|null $loginName for the logged in user