From 236632702cf7fe68cc9ad1dcfcc463e0d4c14d64 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 16 Dec 2014 19:07:14 +0100 Subject: add a isLoggedIn method to the usersession and deprecate the isLoggedIn method on the api --- lib/private/user/session.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/private/user') 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 @@ -137,6 +137,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 * -- cgit v1.2.3