From 2ca32e0062eadcb822298fcd70449fee8dcfcbb9 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 20 Oct 2022 16:14:06 +0900 Subject: [PATCH] Add Session::getLastLoginTime() method --- common/framework/session.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/framework/session.php b/common/framework/session.php index 6d096fe75..271c7dfed 100644 --- a/common/framework/session.php +++ b/common/framework/session.php @@ -1014,6 +1014,18 @@ class Session } } + /** + * Get the last login time. + * + * If the user is not logged in, this method returns 0. + * + * @return int + */ + public static function getLastLoginTime() + { + return $_SESSION['RHYMIX']['last_login'] ?? 0; + } + /** * Get validity information. *