User
class User extends ConcreteObject (View source)
Properties
$error | from ConcreteObject | ||
$uID | |||
$uName | |||
$uGroups | |||
$superUser | |||
$uTimezone | |||
protected | $uDefaultLanguage | ||
protected | $accessEntities | ||
protected | $hasher | ||
protected | $uLastPasswordChange |
Methods
Return an User instance given its id (or null if it's not found)
No description
No description
This code throttles the writing of uLastOnline to the database, so that we're not constantly updating the Users table. If you need to have the exact up to date metric on when a session last looked at a page, use the uOnlineCheck session key.
No description
No description
Increment number of logins and update login timestamps.
$salt is retained for compatibilty with older versions of concerete5, but not used.
This is for compatibility with passwords generated in older versions of concrete5.
No description
No description
No description
No description
No description
No description
No description
Return date in yyyy-mm-dd H:i:s format.
No description
No description
No description
No description
No description
No description
Returns an array of Group objects the user belongs to.
Returns an array of group ids the user belongs to.
Sets a default language for a user record.
Gets the default language for the logged-in user.
Returns date in yyyy-mm-dd H:i:s format.
Checks to see if the current user object is registered. If so, it queries that records default language. Otherwise, it falls back to sitewide settings.
No description
Function to return Permission Access Entities belonging to this user object
No description
No description
No description
No description
No description
No description
No description
Manage user session writing.
No description
No description
Details
loadError($error)
No description
isError()
No description
getError()
No description
setPropertiesFromArray($arr)
No description
static
camelcase($file)
No description
static
uncamelcase($string)
No description
static User|null
getByUserID(int $uID, bool $login = false, bool $cacheItemsOnLogin = true)
Return an User instance given its id (or null if it's not found)
static User
loginByUserID(int $uID)
No description
static
isLoggedIn()
deprecated
deprecated
No description
bool
checkLogin()
No description
void
updateOnlineCheck()
This code throttles the writing of uLastOnline to the database, so that we're not constantly updating the Users table. If you need to have the exact up to date metric on when a session last looked at a page, use the uOnlineCheck session key.
UserInfo|null
getUserInfoObject()
No description
__construct()
No description
recordLogin()
Increment number of logins and update login timestamps.
string
encryptPassword(string $uPassword, null $salt = null)
$salt is retained for compatibilty with older versions of concerete5, but not used.
string
legacyEncryptPassword(string $uPassword)
This is for compatibility with passwords generated in older versions of concrete5.
Use only for checking password hashes, not generating new ones to store.
bool
isActive()
No description
bool
isSuperUser()
No description
int|null
getLastOnline()
No description
string|null
getUserName()
No description
bool
isRegistered()
No description
string
getUserID()
No description
string|null
getUserTimezone()
No description
string
getUserSessionValidSince()
Return date in yyyy-mm-dd H:i:s format.
setAuthTypeCookie(string $authType)
No description
setLastAuthType(AuthenticationType $at)
No description
int
getLastAuthType()
No description
unloadAuthenticationTypes()
No description
logout(bool $hard = true)
No description
invalidateSession(bool $hard = true)
No description
static
verifyAuthTypeCookie()
No description
array
getUserGroupObjects()
Returns an array of Group objects the user belongs to.
array
getUserGroups()
Returns an array of group ids the user belongs to.
setUserDefaultLanguage(string $lang)
Sets a default language for a user record.
string
getUserDefaultLanguage()
Gets the default language for the logged-in user.
string
getLastPasswordChange()
Returns date in yyyy-mm-dd H:i:s format.
string
getUserLanguageToDisplay()
Checks to see if the current user object is registered. If so, it queries that records default language. Otherwise, it falls back to sitewide settings.
refreshUserGroups()
No description
Entity[]
getUserAccessEntityObjects()
Function to return Permission Access Entities belonging to this user object
array
_getUserGroups(bool $disableLogin = false)
No description
enterGroup(Group $g)
No description
exitGroup(Group $g)
No description
bool
inGroup(Group $g)
Return true if user is in Group or any of this groups children.
bool
inExactGroup(Group $g)
Return true if user is in this Group.
Does not check if user is a member of children.
loadMasterCollectionEdit(int $mcID, int $ocID)
No description
bool
loadCollectionEdit(Page $c)
Loads a page in edit mode.
unloadCollectionEdit(bool $removeCache = true)
No description
string|null
config(string $cfKey)
No description
markPreviousFrontendPage(Page $c)
No description
int
getPreviousFrontendPageID()
No description
saveConfig(string $cfKey, string $cfValue)
No description
refreshCollectionEdit(Page $c)
No description
Statement
forceCollectionCheckInAll()
No description
persist(bool $cache_interface = true)
Manage user session writing.
logIn(bool $cache_interface = true)
No description
private bool
isPasswordExpired(Connection $cn, Repository $config, string|null $uLastPasswordChange)
No description