eZPublishCommunityProject  2012.12
eZ\Publish\Core\MVC\Symfony\Security\User Class Reference
+ Inheritance diagram for eZ\Publish\Core\MVC\Symfony\Security\User:
+ Collaboration diagram for eZ\Publish\Core\MVC\Symfony\Security\User:

Public Member Functions

 __construct (APIUser $user=null, array $roles=array())
 
 __toString ()
 
 eraseCredentials ()
 Removes sensitive data from the user. More...
 
 getAPIUser ()
 
 getPassword ()
 Returns the password used to authenticate the user. More...
 
 getRoles ()
 Returns the roles granted to the user. More...
 
 getSalt ()
 Returns the salt that was originally used to encode the password. More...
 
 getUsername ()
 Returns the username used to authenticate the user. More...
 
 isAccountNonExpired ()
 Checks whether the user's account has expired. More...
 
 isAccountNonLocked ()
 Checks whether the user is locked. More...
 
 isCredentialsNonExpired ()
 Checks whether the user's credentials (password) has expired. More...
 
 isEnabled ()
 Checks whether the user is enabled. More...
 
 isEqualTo (UserInterface $user)
 The equality comparison should neither be done by referential equality nor by comparing identities (i.e. More...
 
 setAPIUser (APIUser $user)
 

Private Attributes

 $roles
 
 $user
 

Constructor & Destructor Documentation

eZ\Publish\Core\MVC\Symfony\Security\User::__construct ( APIUser  $user = null,
array  $roles = array() 
)

Member Function Documentation

eZ\Publish\Core\MVC\Symfony\Security\User::__toString ( )
eZ\Publish\Core\MVC\Symfony\Security\User::eraseCredentials ( )

Removes sensitive data from the user.

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

Returns
void
eZ\Publish\Core\MVC\Symfony\Security\User::getAPIUser ( )
Returns
eZ\Publish\Core\MVC\Symfony\Security\User::getPassword ( )

Returns the password used to authenticate the user.

This should be the encoded password. On authentication, a plain-text password will be salted, encoded, and then compared to this value.

Returns
string The password
eZ\Publish\Core\MVC\Symfony\Security\User::getRoles ( )

Returns the roles granted to the user.

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.

Returns
Role[] The user roles
eZ\Publish\Core\MVC\Symfony\Security\User::getSalt ( )

Returns the salt that was originally used to encode the password.

This can return null if the password was not encoded using a salt.

Returns
string The salt
eZ\Publish\Core\MVC\Symfony\Security\User::getUsername ( )

Returns the username used to authenticate the user.

Returns
string The username
eZ\Publish\Core\MVC\Symfony\Security\User::isAccountNonExpired ( )

Checks whether the user's account has expired.

Internally, if this method returns false, the authentication system will throw an AccountExpiredException and prevent login.

Returns
Boolean true if the user's account is non expired, false otherwise
See Also
AccountExpiredException
eZ\Publish\Core\MVC\Symfony\Security\User::isAccountNonLocked ( )

Checks whether the user is locked.

Internally, if this method returns false, the authentication system will throw a LockedException and prevent login.

Returns
Boolean true if the user is not locked, false otherwise
See Also
LockedException
eZ\Publish\Core\MVC\Symfony\Security\User::isCredentialsNonExpired ( )

Checks whether the user's credentials (password) has expired.

Internally, if this method returns false, the authentication system will throw a CredentialsExpiredException and prevent login.

Returns
Boolean true if the user's credentials are non expired, false otherwise
See Also
CredentialsExpiredException
eZ\Publish\Core\MVC\Symfony\Security\User::isEnabled ( )

Checks whether the user is enabled.

Internally, if this method returns false, the authentication system will throw a DisabledException and prevent login.

Returns
Boolean true if the user is enabled, false otherwise
See Also
DisabledException
eZ\Publish\Core\MVC\Symfony\Security\User::isEqualTo ( UserInterface  $user)

The equality comparison should neither be done by referential equality nor by comparing identities (i.e.

getId() === getId()).

However, you do not need to compare every attribute, but only those that are relevant for assessing whether re-authentication is required.

Also implementation should consider that $user instance may implement the extended user interface AdvancedUserInterface.

Parameters
UserInterface$user
Returns
Boolean
eZ\Publish\Core\MVC\Symfony\Security\User::setAPIUser ( APIUser  $user)
Parameters
\eZ\Publish\API\Repository\Values\User\User$user

Member Data Documentation


The documentation for this class was generated from the following file: