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

Traits

Properties

$error from  ConcreteObject
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

isError()

No description

getError()

No description

setPropertiesFromArray($arr)

No description

static 
camelcase($file)

No description

static 
uncamelcase($string)

No description

getAttributeValueObject(AttributeKeyInterface|string $ak, bool $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() deprecated

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, File[] $attachments = [])

Sent a private message.

getUserObject()

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

bool|null
update(array $data)

No description

bool
passwordMatches(string $uPassword)

Checks the uPassword record for the current user and returns true if the hashed version of the passed password matches.

updateGroups(int[] $groupArray)

No description

string
setupValidation()

No description

true
markValidated()

No description

bool
changePassword(string $newPassword)

No description

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

No description

activate()

No description

bool
triggerDeactivate(int|null $requesterUID = null)

No description

deactivate()

No description

string|null
resetUserPassword(int $length = 256)

No description

getUserAvatar()

No description

URLInterface|null
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

getUserDateLastUpdated()

No description

getUserName()

No description

getUserDisplayName()

No description

getUserPassword()

No description

getUserEmail()

No description

getUserHomeFolderId()

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();.

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()

AttributeValueInterface|null getAttributeValueObject(AttributeKeyInterface|string $ak, bool $createIfNotExists = false)

No description

Parameters

AttributeKeyInterface|string $ak

An attribute key instance (or its handle)

bool $createIfNotExists

Shall the generic attribute value be created if it does not already exist?

Return Value

AttributeValueInterface|null

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() deprecated

deprecated

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, File[] $attachments = [])

Sent a private message.

Parameters

UserInfo $recipient
string $subject
string $text
PrivateMessage $inReplyTo
File[] $attachments

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

bool passwordMatches(string $uPassword)

Checks the uPassword record for the current user and returns true if the hashed version of the passed password matches.

Parameters

string $uPassword

Return Value

bool

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(string|null $action = null, int|null $requesterUID = null)

No description

Parameters

string|null $action
int|null $requesterUID

Use null for the current user

Return Value

bool

activate()

No description

bool triggerDeactivate(int|null $requesterUID = null)

No description

Parameters

int|null $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

URLInterface|null getUserPublicProfileUrl()

No description

Return Value

URLInterface|null

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

getUserDateLastUpdated()

No description

getUserName()

No description

getUserDisplayName()

No description

getUserPassword()

No description

getUserEmail()

No description

getUserHomeFolderId()

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