class UserInfo extends Object implements ObjectInterface (View source)

Traits

Properties

$error from Object
protected $avatarService
protected $application
protected $attributeCategory
protected $entityManager
protected $connection
protected User $entity

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

No description

bool|UserValue
getAttributeValueObject(string|UserKey $ak, bool $createIfNotExists = false)

No description

getAttribute($ak, $mode = false)

No description

Value
getAttributeValue($ak)

No description

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

Group[]
getUserBadges()

No description

bool
triggerDelete(User $requester)

No description

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 = false)

No description

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

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

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

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

getObjectAttributeCategory()

bool|UserValue getAttributeValueObject(string|UserKey $ak, bool $createIfNotExists = false)

Parameters

string|UserKey $ak
bool $createIfNotExists

Return Value

bool|UserValue

getAttribute($ak, $mode = false)

Parameters

$ak
$mode

Value getAttributeValue($ak)

Parameters

$ak

Return Value

Value

clearAttribute(AttributeKeyInterface $ak)

Parameters

AttributeKeyInterface $ak | string $ak

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

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

Parameters

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

string __toString()

Return Value

string

getPermissionObjectIdentifier()

getPermissionResponseClassName()

getPermissionAssignmentClassName()

getPermissionObjectKeyCategoryHandle()

setEntityObject(User $entity)

Parameters

User $entity

User getEntityObject()

Return Value

User

Group[] getUserBadges()

Return Value

Group[]

bool triggerDelete(User $requester)

Parameters

User $requester

Return Value

bool

delete()

Deletes a user.

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 = false)

Parameters

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

Return Value

ErrorList|false|null

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

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

Return Value

bool

activate()

bool triggerDeactivate(null|int $requesterUID = null)

Parameters

null|int $requesterUID

Return Value

bool

deactivate()

string|null resetUserPassword()

Return Value

string|null

AvatarInterface getUserAvatar()

Return Value

AvatarInterface

null|URLInterface getUserPublicProfileUrl()

Return Value

null|URLInterface

bool hasAvatar()

Return Value

bool

getLastLogin()

string|null getLastIPAddress()

Return Value

string|null

getPreviousLogin()

isActive()

isValidated()

isFullRecord()

getNumLogins()

getUserID()

getUserName()

getUserDisplayName()

getUserPassword()

getUserEmail()

getUserTimezone()

getUserDefaultLanguage()

getUserDateAdded()

getLastOnline()

saveUserAttributesForm(UserAttributeKey[] $attributes)

Parameters

UserAttributeKey[] $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

static add($data) deprecated

deprecated

Parameters

$data

static addSuperUser($uPasswordEncrypted, $uEmail) deprecated

deprecated

Parameters

$uPasswordEncrypted
$uEmail

static register($data) deprecated

deprecated

Parameters

$data

static getByID($uID) deprecated

deprecated

Parameters

$uID

static getByUserName($uName) deprecated

deprecated

Parameters

$uName

static getByEmail($uEmail) deprecated

deprecated

Parameters

$uEmail

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

deprecated

Parameters

$uHash
$unredeemedHashesOnly