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. *