Core classCoredna\Kernel\Helper\Response

CurrentUser

Helper for accessing information about the currently authenticated user. Can be accessed with $_currentUser

Coredna\Kernel\Helper\Response\CurrentUser

Properties 11

Take no arguments.

# getId()
?int
Return the id of the currently authenticated user. Returns null if no user is authenticated.
# getGlobalId()
?int
Return the global id for the user, if the user has a global user
# getPersonId()
?int
Return the person id for the user, if the user is logged in
# isLoggedIn()
bool
Check whether a user is logged in
# isAdmin()
bool
Check whether the logged in user is an admin for the current site. Will also return true if the user is a superadmin or developer.
# isSuperAdmin()
bool
Check whether the logged in user is a superadmin. Superadmins are allowed full access to all sites in a client's database. Will also return true if the user is a developer.
# isDeveloper()
bool
Check whether the logged in user is a developer. Developers are allowed full access to everything and can switch sites.
# isFrontendUser()
bool
Check whether the logged in user is a frontend user
# isBackendUser()
bool
Check whether the logged in user is a backend user
# getType()
string
Get the user type for the logged in user. Returns 'frontend' if the user is not logged in.
# getFullName()
string
Get the current user's full name. Returns an empty string if no user is logged in.