CurrentUser
Utility class for assessing the authentication state or identity of the current actor
class
CurrentUser
Methods summary
Return Type | Method Name | Description | |
---|---|---|---|
bool | isAuthenticatedUser() | Whether the current actor is authenticated as a User | |
bool | isAuthenticatedAdmin() | Whether the current actor is authenticated as an Admin | |
bool | isMasqueradingAdmin() | Whether the current actor is authenticated as an Admin but is also acting on behalf of the client, having performed a "Login as Owner". | |
User|null | user() | Get the currently authenticated user. | |
Admin|null | admin() | Get the currently authenticated admin. | |
Client|null | client() | Get the currently active client for management. |
Details
bool
isAuthenticatedUser ()
Whether the current actor is authenticated as a User
bool
isAuthenticatedAdmin ()
Whether the current actor is authenticated as an Admin
bool
isMasqueradingAdmin ()
Whether the current actor is authenticated as an Admin but is also acting on behalf of the client, having performed a "Login as Owner".
User|null
user ()
Get the currently authenticated user.
Admin|null
admin ()
Get the currently authenticated admin.
Client|null
client ()
Get the currently active client for management.