File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -306,15 +306,14 @@ public static function isAdminUser($uid) {
306306 return $ isAdmin && self ::$ incognitoMode === false ;
307307 }
308308
309-
310309 /**
311- * get the user id of the user currently logged in.
310+ * Get the user id of the user currently logged in unless in incognito mode .
312311 *
313- * @return string|false uid or false
312+ * @return string|false User id if available; false otherwise.
314313 */
315- public static function getUser () {
314+ public static function getUser (): string | false {
316315 $ uid = Server::get (ISession::class)?->get('user_id ' );
317- if (! is_null ( $ uid) && self ::$ incognitoMode === false ) {
316+ if ($ uid !== null && self ::$ incognitoMode === false ) {
318317 return $ uid ;
319318 } else {
320319 return false ;
You can’t perform that action at this time.
0 commit comments