User
in package
implements
IdentityInterface
User model.
Tags
Attributes
- #[Entity]
Table of Contents
Interfaces
Properties
- $lidnr : int
- The membership number.
- $member : Member
- The corresponding member for this user.
- $password : string
- The user's password.
- $passwordChangedOn : DateTime|null
- Timestamp when the password was last changed.
- $roles : Collection<string|int, UserRole>
- User roles.
Methods
- __construct() : mixed
- getEmail() : string|null
- Get the user's email address.
- getId() : int
- Return the `lidnr` of this user, generalised to `id` for the {@link AuthenticationService}.
- getLidnr() : int
- Get the membership number.
- getMember() : Member
- Get the member information of this user.
- getPassword() : string
- Get the password hash.
- getPasswordChangedOn() : DateTime|null
- getResourceId() : string
- Get the user's resource ID.
- getRoleId() : string
- getRoleNames() : array<string|int, string>
- Get the user's active role names.
- getRoles() : Collection<string|int, UserRole>
- Get the user's roles.
- setLidnr() : void
- setMember() : void
- setPassword() : void
- Set the password hash.
- setPasswordChangedOn() : void
- setRoles() : void
- toGdprArray() : UserGdprArrayType
Properties
$lidnr
The membership number.
protected
int
$lidnr
Attributes
- #[Column]
- $type: 'integer'
- #[Id]
$member
The corresponding member for this user.
protected
Member
$member
Attributes
- #[JoinColumn]
- $name: 'lidnr'
- $referencedColumnName: 'lidnr'
- $nullable: false
- #[OneToOne]
- $targetEntity: \Decision\Model\Member::class
- $fetch: 'EAGER'
$password
The user's password.
protected
string
$password
Attributes
- #[Column]
- $type: 'string'
$passwordChangedOn
Timestamp when the password was last changed.
protected
DateTime|null
$passwordChangedOn
= null
Attributes
- #[Column]
- $type: 'datetime'
- $nullable: true
$roles
User roles.
protected
Collection<string|int, UserRole>
$roles
Attributes
- #[OneToMany]
- $targetEntity: \User\Model\UserRole::class
- $mappedBy: 'lidnr'
- $fetch: 'EAGER'
Methods
__construct()
public
__construct([NewUser|null $newUser = null ]) : mixed
Parameters
- $newUser : NewUser|null = null
getEmail()
Get the user's email address.
public
getEmail() : string|null
Return values
string|nullgetId()
Return the `lidnr` of this user, generalised to `id` for the {@link AuthenticationService}.
public
getId() : int
Return values
intgetLidnr()
Get the membership number.
public
getLidnr() : int
Return values
intgetMember()
Get the member information of this user.
public
getMember() : Member
Return values
MembergetPassword()
Get the password hash.
public
getPassword() : string
Return values
stringgetPasswordChangedOn()
public
getPasswordChangedOn() : DateTime|null
Return values
DateTime|nullgetResourceId()
Get the user's resource ID.
public
getResourceId() : string
Return values
stringgetRoleId()
public
getRoleId() : string
Return values
stringgetRoleNames()
Get the user's active role names.
public
getRoleNames() : array<string|int, string>
Return values
array<string|int, string> —Role names
getRoles()
Get the user's roles.
public
getRoles() : Collection<string|int, UserRole>
Return values
Collection<string|int, UserRole>setLidnr()
public
setLidnr(int $lidnr) : void
Parameters
- $lidnr : int
setMember()
public
setMember(Member $member) : void
Parameters
- $member : Member
setPassword()
Set the password hash.
public
setPassword(string $password) : void
Parameters
- $password : string
setPasswordChangedOn()
public
setPasswordChangedOn(DateTime $passwordChangedOn) : void
Parameters
- $passwordChangedOn : DateTime
setRoles()
public
setRoles(ArrayCollection $roles) : void
Parameters
- $roles : ArrayCollection
toGdprArray()
public
toGdprArray() : UserGdprArrayType