UserObjectLegacyTrait
Trait UserObjectLegacyTrait
Table of Contents
Methods
- authorise() : bool
- Checks user authorization to the action.
- avatarUrl() : string
- Return the User's avatar URL
- count() : int
- Implements Countable interface.
- getAvatarMedia() : ImageMedium|StaticImageMedium|null
- Return media object for the User's avatar.
- merge() : $this
- Merge two configurations together.
Methods
authorise()
Checks user authorization to the action.
public
authorise(string $action) : bool
Use ->authorize() method instead.
Ensures backwards compatibility
Parameters
- $action : string
Return values
boolavatarUrl()
Return the User's avatar URL
public
avatarUrl() : string
Use ->getAvatarUrl() method instead.
Return values
stringcount()
Implements Countable interface.
public
count() : int
Method makes no sense for user account.
Attributes
- #[ReturnTypeWillChange]
Return values
intgetAvatarMedia()
Return media object for the User's avatar.
public
getAvatarMedia() : ImageMedium|StaticImageMedium|null
Use ->getAvatarImage() method instead.
Return values
ImageMedium|StaticImageMedium|nullmerge()
Merge two configurations together.
public
merge(array<string|int, mixed> $data) : $this
Use ->update($data) instead (same but with data validation & filtering, file upload support).
Parameters
- $data : array<string|int, mixed>