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
Return true if user is logged in.
No description
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
No description
No description
No description
No description
No description
No description
No description
No description
No description
Manage user session writing.
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 bool
isLoggedIn()
Return true if user is logged in.
bool
checkLogin()
No description
UserInfo|null
getUserInfoObject()
No description
__construct()
No description
recordLogin()
Increment number of logins and update login timestamps.
recordView(Page $c)
Update PageStatistics
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
array
getUserAccessEntityObjects()
No description
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.
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
PasswordHash
getUserPasswordHasher()
No description
persist(bool $cache_interface = true)
Manage user session writing.
logIn(bool $cache_interface = true)
No description