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

Value
setAttribute(AttributeKeyInterface $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)

Parameters

$error

isError()

getError()

setPropertiesFromArray($arr)

Parameters

$arr

static camelcase($file)

Parameters

$file

static uncamelcase($string)

Parameters

$string

CategoryInterface getObjectAttributeCategory()

Return Value

CategoryInterface

See also

\Concrete\Core\Attribute\ObjectInterface::getObjectAttributeCategory()

getAttributeValueObject($ak, $createIfNotExists = false)

Parameters

$ak
$createIfNotExists

getAttribute($ak, $mode = false)

Parameters

$ak
$mode

Value getAttributeValue($ak)

Parameters

$ak

Return Value

Value

clearAttribute(AttributeKeyInterface $ak)

Parameters

AttributeKeyInterface $ak | string $ak

Value setAttribute(AttributeKeyInterface $ak, mixed $value)

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

Parameters

AttributeKeyInterface $ak | string $ak
mixed $value

Return Value

Value

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

Parameters

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

string __toString()

Return Value

string

getPermissionObjectIdentifier()

See also

\Concrete\Core\Permission\ObjectInterface::getPermissionObjectIdentifier()

getPermissionResponseClassName()

See also

\Concrete\Core\Permission\ObjectInterface::getPermissionResponseClassName()

getPermissionAssignmentClassName()

See also

\Concrete\Core\Permission\ObjectInterface::getPermissionAssignmentClassName()

getPermissionObjectKeyCategoryHandle()

See also

\Concrete\Core\Permission\ObjectInterface::getPermissionObjectKeyCategoryHandle()

setEntityObject(User $entity)

Parameters

User $entity

User getEntityObject()

Return Value

User

ItemInterface getExporter()

Return Value

ItemInterface

Group[] getUserBadges()

Return Value

Group[]

bool triggerDelete(User $requester)

Parameters

User $requester

Return Value

bool

bool delete()

Deletes a user.

Return Value

bool

bool canReadPrivateMessage(PrivateMessage $msg)

Parameters

PrivateMessage $msg

Return Value

bool

updateUserAvatar(ImageInterface $image)

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)

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)

Parameters

int[] $groupArray

string setupValidation()

Return Value

string

true markValidated()

Return Value

true

bool changePassword(string $newPassword)

Parameters

string $newPassword

Return Value

bool

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

Parameters

null|string $action
null|int $requesterUID Use null for the current user

Return Value

bool

activate()

bool triggerDeactivate(null|int $requesterUID = null)

Parameters

null|int $requesterUID Use null for the current user

Return Value

bool

deactivate()

string|null resetUserPassword(int $length = 256)

Parameters

int $length

Return Value

string|null

AvatarInterface getUserAvatar()

Return Value

AvatarInterface

null|URLInterface getUserPublicProfileUrl()

Return Value

null|URLInterface

bool hasAvatar()

Return Value

bool

getLastLogin()

See also

\Concrete\Core\Entity\User\User::getUserLastLogin()

string|null getLastIPAddress()

Return Value

string|null

getPreviousLogin()

See also

\Concrete\Core\Entity\User\User::getUserPreviousLogin()

isActive()

See also

\Concrete\Core\Entity\User\User::isUserActive()

isValidated()

See also

\Concrete\Core\Entity\User\User::isUserValidated()

isFullRecord()

See also

\Concrete\Core\Entity\User\User::isUserFullRecord()

getNumLogins()

See also

\Concrete\Core\Entity\User\User::getUserTotalLogins()

getUserID()

See also

\Concrete\Core\Entity\User\User::getUserID()

getUserName()

See also

\Concrete\Core\Entity\User\User::getUserName()

getUserDisplayName()

See also

\Concrete\Core\Entity\User\User::getUserName()

getUserPassword()

See also

\Concrete\Core\Entity\User\User::getUserPassword()

getUserEmail()

See also

\Concrete\Core\Entity\User\User::getUserEmail()

getUserTimezone()

See also

\Concrete\Core\Entity\User\User::getUserTimezone()

getUserDefaultLanguage()

See also

\Concrete\Core\Entity\User\User::getUserDefaultLanguage()

getUserDateAdded()

See also

\Concrete\Core\Entity\User\User::getUserDateAdded()

getLastOnline()

See also

\Concrete\Core\Entity\User\User::getUserLastOnline()

saveUserAttributesForm(UserAttributeKey[] $attributes)

Parameters

UserAttributeKey[] $attributes

saveUserAttributesDefault(array $attributes)

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

Return Value

EventDispatcher

static add($data) deprecated

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

Parameters

$data

static addSuperUser($uPasswordEncrypted, $uEmail) deprecated

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

Parameters

$uPasswordEncrypted
$uEmail

static register($data) deprecated

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

Parameters

$data

static getByID($uID) deprecated

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

Parameters

$uID

static getByUserName($uName) deprecated

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

Parameters

$uName

static getByEmail($uEmail) deprecated

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

Parameters

$uEmail

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

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

Parameters

$uHash
$unredeemedHashesOnly