class UserInfo extends Object implements ObjectInterface, ObjectInterface, ExportableInterface (View source)

Traits

Properties

$error from  Object
protected AvatarServiceInterface $avatarService
protected Application $application
protected UserCategory $attributeCategory
protected EntityManagerInterface $entityManager
protected Connection $connection
protected User $entity
protected EventDispatcher|null $director

Methods

loadError($error)

No description

from  Object
isError()

No description

from  Object
getError()

No description

from  Object
setPropertiesFromArray($arr)

No description

from  Object
static 
camelcase($file)

No description

from  Object
static 
uncamelcase($string)

No description

from  Object
getAttributeValueObject($ak, $createIfNotExists = false)

No description

getAttribute($ak, $mode = false)

No description

Value
getAttributeValue($ak)

No description

clearAttribute($ak)

No description

Value
setAttribute($ak, mixed $value)

Sets the attribute of a user info object to the specified value, and saves it in the database.

__construct(EntityManagerInterface $entityManager, UserCategory $attributeCategory, Application $application, AvatarServiceInterface $avatarService)

No description

string
__toString()

No description

setEntityObject(User $entity)

No description

getEntityObject()

No description

getExporter()

No description

Group[]
getUserBadges()

No description

bool
triggerDelete(User $requester)

No description

bool
delete()

Deletes a user.

bool
canReadPrivateMessage(PrivateMessage $msg)

No description

updateUserAvatar(ImageInterface $image)

No description

markAsPasswordReset()

Marks the current user as having had a password reset from the system.

ErrorList|false|null
sendPrivateMessage(UserInfo $recipient, string $subject, string $text, PrivateMessage $inReplyTo = null)

Sent a private message.

User
getUserObject()

Gets the User object of the current UserInfo object ($this).

bool|null
update(array $data)

No description

updateGroups(int[] $groupArray)

No description

string
setupValidation()

No description

true
markValidated()

No description

bool
changePassword(string $newPassword)

No description

bool
triggerActivate(null|string $action = null, null|int $requesterUID = null)

No description

activate()

No description

bool
triggerDeactivate(null|int $requesterUID = null)

No description

deactivate()

No description

string|null
resetUserPassword(int $length = 256)

No description

getUserAvatar()

No description

null|URLInterface
getUserPublicProfileUrl()

No description

bool
hasAvatar()

No description

getLastLogin()

No description

string|null
getLastIPAddress()

No description

getPreviousLogin()

No description

isActive()

No description

isValidated()

No description

isFullRecord()

No description

getNumLogins()

No description

getUserID()

No description

getUserName()

No description

getUserDisplayName()

No description

getUserPassword()

No description

getUserEmail()

No description

getUserTimezone()

No description

getUserDefaultLanguage()

No description

getUserDateAdded()

No description

getLastOnline()

No description

saveUserAttributesForm(UserAttributeKey[] $attributes)

No description

saveUserAttributesDefault(array $attributes)

No description

mixed|null
__call($nm, $a)

Magic method for user attributes. This is db expensive but pretty damn cool so if the attrib handle is "my_attribute", then get the attribute with $ui->getUserMyAttribute(), or "uFirstName" become $ui->getUserUfirstname();.

EventDispatcher
getDirector()

No description

static 
add($data) deprecated

No description

static 
addSuperUser($uPasswordEncrypted, $uEmail) deprecated

No description

static 
register($data) deprecated

No description

static 
getByID($uID) deprecated

No description

static 
getByUserName($uName) deprecated

No description

static 
getByEmail($uEmail) deprecated

No description

static 
getByValidationHash($uHash, $unredeemedHashesOnly = true) deprecated

No description

Details

loadError($error)

No description

Parameters

$error

isError()

No description

getError()

No description

setPropertiesFromArray($arr)

No description

Parameters

$arr

static camelcase($file)

No description

Parameters

$file

static uncamelcase($string)

No description

Parameters

$string

CategoryInterface getObjectAttributeCategory()

getAttributeValueObject($ak, $createIfNotExists = false)

No description

Parameters

$ak
$createIfNotExists

getAttribute($ak, $mode = false)

No description

Parameters

$ak
$mode

Value getAttributeValue($ak)

No description

Parameters

$ak

Return Value

Value

clearAttribute($ak)

No description

Parameters

$ak

Value setAttribute($ak, mixed $value)

Sets the attribute of a user info object to the specified value, and saves it in the database.

Parameters

$ak
mixed $value

Return Value

Value

__construct(EntityManagerInterface $entityManager, UserCategory $attributeCategory, Application $application, AvatarServiceInterface $avatarService)

No description

Parameters

EntityManagerInterface $entityManager
UserCategory $attributeCategory
Application $application
AvatarServiceInterface $avatarService

string __toString()

No description

Return Value

string

getPermissionObjectIdentifier()

getPermissionResponseClassName()

getPermissionAssignmentClassName()

getPermissionObjectKeyCategoryHandle()

setEntityObject(User $entity)

No description

Parameters

User $entity

User getEntityObject()

No description

Return Value

User

ItemInterface getExporter()

No description

Return Value

ItemInterface

Group[] getUserBadges()

No description

Return Value

Group[]

bool triggerDelete(User $requester)

No description

Parameters

User $requester

Return Value

bool

bool delete()

Deletes a user.

Return Value

bool

bool canReadPrivateMessage(PrivateMessage $msg)

No description

Parameters

PrivateMessage $msg

Return Value

bool

updateUserAvatar(ImageInterface $image)

No description

Parameters

ImageInterface $image

markAsPasswordReset()

Marks the current user as having had a password reset from the system.

ErrorList|false|null sendPrivateMessage(UserInfo $recipient, string $subject, string $text, PrivateMessage $inReplyTo = null)

Sent a private message.

Parameters

UserInfo $recipient
string $subject
string $text
PrivateMessage $inReplyTo

Return Value

ErrorList|false|null

Returns:

  • an error if the send limit has been reached
  • false if the message is detected as spam
  • null if no errors occurred

User getUserObject()

Gets the User object of the current UserInfo object ($this).

Return Value

User

bool|null update(array $data)

No description

Parameters

array $data

Return Value

bool|null

returns false if the record has not been saved, null if the password confirmation failed, true otherwise

updateGroups(int[] $groupArray)

No description

Parameters

int[] $groupArray

string setupValidation()

No description

Return Value

string

true markValidated()

No description

Return Value

true

bool changePassword(string $newPassword)

No description

Parameters

string $newPassword

Return Value

bool

bool triggerActivate(null|string $action = null, null|int $requesterUID = null)

No description

Parameters

null|string $action
null|int $requesterUID

Use null for the current user

Return Value

bool

activate()

No description

bool triggerDeactivate(null|int $requesterUID = null)

No description

Parameters

null|int $requesterUID

Use null for the current user

Return Value

bool

deactivate()

No description

string|null resetUserPassword(int $length = 256)

No description

Parameters

int $length

Return Value

string|null

AvatarInterface getUserAvatar()

No description

Return Value

AvatarInterface

null|URLInterface getUserPublicProfileUrl()

No description

Return Value

null|URLInterface

bool hasAvatar()

No description

Return Value

bool

getLastLogin()

No description

string|null getLastIPAddress()

No description

Return Value

string|null

getPreviousLogin()

No description

isActive()

No description

isValidated()

No description

isFullRecord()

No description

getNumLogins()

No description

getUserID()

No description

getUserName()

No description

getUserDisplayName()

No description

getUserPassword()

No description

getUserEmail()

No description

getUserTimezone()

No description

getUserDefaultLanguage()

No description

getUserDateAdded()

No description

getLastOnline()

No description

saveUserAttributesForm(UserAttributeKey[] $attributes)

No description

Parameters

UserAttributeKey[] $attributes

saveUserAttributesDefault(array $attributes)

No description

Parameters

array $attributes

mixed|null __call($nm, $a)

Magic method for user attributes. This is db expensive but pretty damn cool so if the attrib handle is "my_attribute", then get the attribute with $ui->getUserMyAttribute(), or "uFirstName" become $ui->getUserUfirstname();.

Parameters

$nm
$a

Return Value

mixed|null

protected EventDispatcher getDirector()

No description

Return Value

EventDispatcher

static add($data) deprecated

deprecated Use \Core::make('user/registration')->create()

No description

Parameters

$data

static addSuperUser($uPasswordEncrypted, $uEmail) deprecated

deprecated Use \Core::make('user/registration')->createSuperUser()

No description

Parameters

$uPasswordEncrypted
$uEmail

static register($data) deprecated

deprecated Use \Core::make('user/registration')->createFromPublicRegistration()

No description

Parameters

$data

static getByID($uID) deprecated

deprecated use \Core::make('Concrete\Core\User\UserInfoRepository')->getByID()

No description

Parameters

$uID

static getByUserName($uName) deprecated

deprecated use \Core::make('Concrete\Core\User\UserInfoRepository')->getByName()

No description

Parameters

$uName

static getByEmail($uEmail) deprecated

deprecated use \Core::make('Concrete\Core\User\UserInfoRepository')->getByEmail()

No description

Parameters

$uEmail

static getByValidationHash($uHash, $unredeemedHashesOnly = true) deprecated

deprecated use \Core::make('Concrete\Core\User\UserInfoRepository')->getByValidationHash()

No description

Parameters

$uHash
$unredeemedHashesOnly