PHP Класс eZ\Publish\Core\MVC\Symfony\Security\User

Наследование: implements eZ\Publish\Core\MVC\Symfony\Security\UserInterface, implements Symfony\Component\Security\Core\User\EquatableInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( eZ\Publish\API\Repository\Values\User\User $user = null, array $roles = [] )
__toString ( )
eraseCredentials ( ) Removes sensitive data from the user.
getAPIUser ( ) : eZ\Publish\API\Repository\Values\User\User
getPassword ( ) : string Returns the password used to authenticate the user.
getRoles ( ) : Role[] Returns the roles granted to the user.
getSalt ( ) : string Returns the salt that was originally used to encode the password.
getUsername ( ) : string Returns the username used to authenticate the user.
isAccountNonExpired ( ) : boolean Checks whether the user's account has expired.
isAccountNonLocked ( ) : boolean Checks whether the user is locked.
isCredentialsNonExpired ( ) : boolean Checks whether the user's credentials (password) has expired.
isEnabled ( ) : boolean Checks whether the user is enabled.
isEqualTo ( Symfony\Component\Security\Core\User\UserInterface $user )
setAPIUser ( eZ\Publish\API\Repository\Values\User\User $user )

Описание методов

__construct() публичный Метод

public __construct ( eZ\Publish\API\Repository\Values\User\User $user = null, array $roles = [] )
$user eZ\Publish\API\Repository\Values\User\User
$roles array

__toString() публичный Метод

public __toString ( )

eraseCredentials() публичный Метод

This is important if, at any given point, sensitive information like the plain-text password is stored on this object.
public eraseCredentials ( )

getAPIUser() публичный Метод

public getAPIUser ( ) : eZ\Publish\API\Repository\Values\User\User
Результат eZ\Publish\API\Repository\Values\User\User

getPassword() публичный Метод

This should be the encoded password. On authentication, a plain-text password will be salted, encoded, and then compared to this value.
public getPassword ( ) : string
Результат string The password

getRoles() публичный Метод

public function getRoles() { return array( 'ROLE_USER' ); } Alternatively, the roles might be stored on a roles property, and populated in any number of different ways when the user object is created.
public getRoles ( ) : Role[]
Результат Role[] The user roles

getSalt() публичный Метод

This can return null if the password was not encoded using a salt.
public getSalt ( ) : string
Результат string The salt

getUsername() публичный Метод

Returns the username used to authenticate the user.
public getUsername ( ) : string
Результат string The username

isAccountNonExpired() публичный Метод

Internally, if this method returns false, the authentication system will throw an AccountExpiredException and prevent login.
См. также: AccountExpiredException
public isAccountNonExpired ( ) : boolean
Результат boolean true if the user's account is non expired, false otherwise

isAccountNonLocked() публичный Метод

Internally, if this method returns false, the authentication system will throw a LockedException and prevent login.
См. также: LockedException
public isAccountNonLocked ( ) : boolean
Результат boolean true if the user is not locked, false otherwise

isCredentialsNonExpired() публичный Метод

Internally, if this method returns false, the authentication system will throw a CredentialsExpiredException and prevent login.
См. также: CredentialsExpiredException
public isCredentialsNonExpired ( ) : boolean
Результат boolean true if the user's credentials are non expired, false otherwise

isEnabled() публичный Метод

Internally, if this method returns false, the authentication system will throw a DisabledException and prevent login.
См. также: DisabledException
public isEnabled ( ) : boolean
Результат boolean true if the user is enabled, false otherwise

isEqualTo() публичный Метод

public isEqualTo ( Symfony\Component\Security\Core\User\UserInterface $user )
$user Symfony\Component\Security\Core\User\UserInterface

setAPIUser() публичный Метод

public setAPIUser ( eZ\Publish\API\Repository\Values\User\User $user )
$user eZ\Publish\API\Repository\Values\User\User