Account
class Account (View source)
An account model
Properties
protected string | $accountIdentifier | ||
protected string | $authenticationProviderName | ||
protected string | $credentialsSource | ||
protected DateTime | $creationDate | ||
protected DateTime | $expirationDate | ||
protected DateTime | $lastSuccessfulAuthenticationDate | ||
protected int | $failedAuthenticationCount | ||
protected array | $roleIdentifiers | ||
protected Role[] | $roles | ||
protected PolicyService | $policyService | ||
protected ObjectManagerInterface | $objectManager | ||
protected Now | $now |
Methods
Upon creation the creationDate property is initialized.
Initializes the roles field by fetching the role objects referenced by the roleIdentifiers
Returns the account identifier
Set the account identifier
Returns the authentication provider name this account corresponds to
Set the authentication provider name this account corresponds to
Returns the credentials source
Sets the credentials source
Sets the roles for this account
Returns the date on which this account has been created.
Returns the date on which this account has expired or will expire. If no expiration date has been set, NULL is returned.
Sets the date on which this account will become inactive
No description
No description
Sets the authentication status. Usually called by the responsible \Neos\Flow\Security\Authentication\AuthenticationManagerInterface
Returns true if it is currently allowed to use this account for authentication.
Details
__construct()
Upon creation the creationDate property is initialized.
protected void
initializeRoles()
Initializes the roles field by fetching the role objects referenced by the roleIdentifiers
string
getAccountIdentifier()
Returns the account identifier
void
setAccountIdentifier(string $accountIdentifier)
Set the account identifier
string
getAuthenticationProviderName()
Returns the authentication provider name this account corresponds to
void
setAuthenticationProviderName(string $authenticationProviderName)
Set the authentication provider name this account corresponds to
mixed
getCredentialsSource()
Returns the credentials source
void
setCredentialsSource(mixed $credentialsSource)
Sets the credentials source
Role[]
getRoles()
Returns the roles this account has assigned
void
setRoles(array $roles)
Sets the roles for this account
bool
hasRole(Role $role)
Return if the account has a certain role
void
addRole(Role $role)
Adds a role to this account
void
removeRole(Role $role)
Removes a role from this account
DateTime
getCreationDate()
Returns the date on which this account has been created.
DateTime
getExpirationDate()
Returns the date on which this account has expired or will expire. If no expiration date has been set, NULL is returned.
void
setExpirationDate(DateTime $expirationDate = null)
Sets the date on which this account will become inactive
int
getFailedAuthenticationCount()
No description
DateTime
getLastSuccessfulAuthenticationDate()
No description
void
authenticationAttempted(int $authenticationStatus)
Sets the authentication status. Usually called by the responsible \Neos\Flow\Security\Authentication\AuthenticationManagerInterface
bool
isActive()
Returns true if it is currently allowed to use this account for authentication.
Returns false if the account has expired.