Adapt UserSession
- Move from App methods to UserSession methods - Deprecate corresponding App methods
This commit is contained in:
@@ -33,6 +33,13 @@ interface IHandleUserSessions extends IHandleSessions
|
||||
*/
|
||||
public function getLocalUserId();
|
||||
|
||||
/**
|
||||
* Returns the user nickname of locally logged-in user.
|
||||
*
|
||||
* @return string|false User's nickname or false
|
||||
*/
|
||||
public function getLocalUserNickname();
|
||||
|
||||
/**
|
||||
* Returns the public contact id of logged-in user or false.
|
||||
*
|
||||
@@ -79,6 +86,13 @@ interface IHandleUserSessions extends IHandleSessions
|
||||
*/
|
||||
public function isAuthenticated(): bool;
|
||||
|
||||
/**
|
||||
* Check if current user has admin role.
|
||||
*
|
||||
* @return bool true if user is an admin
|
||||
*/
|
||||
public function isSiteAdmin(): bool;
|
||||
|
||||
/**
|
||||
* Returns User ID of the managed user in case it's a different identity
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user