Symfony\Component\Security\Core\User\AdvancedUserInterface
Adds extra features to a user class related to account status flags.
This interface can be implemented in place of UserInterface if you'd like
the authentication system to consider different account status flags
during authentication. If any of the methods in this interface return
false, authentication will fail.
If you need to perform custom logic for any of these situations, then
you will need to register an exception listener and watch for the specific
exception instances thrown in each case. All exceptions are a subclass
of AccountStatusException
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
interface AdvancedUserInterface
extends UserInterface
{
- // methods
- public Boolean isAccountNonExpired()
- public Boolean isAccountNonLocked()
- public Boolean isCredentialsNonExpired()
- public Boolean isEnabled()
- // Inherited methods from UserInterface
- public array getRoles()
- public string getPassword()
- public string getSalt()
- public string getUsername()
- public void eraseCredentials()
Hierarchy
Extends
Implemented by
Methods
public
- isAccountNonExpired() — Checks whether the user's account has expired.
- isAccountNonLocked() — Checks whether the user is locked.
- isCredentialsNonExpired() — Checks whether the user's credentials (password) has expired.
- isEnabled() — Checks whether the user is enabled.
Inherited from Symfony\Component\Security\Core\User\UserInterface
public
- eraseCredentials() — Removes sensitive data from the user.
- getPassword() — Returns the password used to authenticate the user.
- getRoles() — Returns the roles granted to the user.
- getSalt() — Returns the salt that was originally used to encode the password.
- getUsername() — Returns the username used to authenticate the user.