Overview

Namespaces

  • PHP
  • ProgrammingAreHard
    • Arbiter
      • Domain
      • Model
  • Symfony
    • Component
      • Security
        • Acl
          • Exception
          • Model
          • Permission
        • Core
          • User

Classes

  • ChainUserProvider
  • InMemoryUserProvider
  • User
  • UserChecker

Interfaces

  • AdvancedUserInterface
  • EquatableInterface
  • UserCheckerInterface
  • UserInterface
  • UserProviderInterface
  • Overview
  • Namespace
  • Class
  • Tree

Interface UserInterface

Represents the interface that all user classes must implement.

This interface is useful because the authentication layer can deal with the object through its lifecycle, using the object to get the encoded password (for checking against a submitted password), assigning roles and so on.

Regardless of how your user are loaded or where they come from (a database, configuration, web service, etc), you will have a class that implements this interface. Objects that implement this interface are created and loaded by different objects that implement UserProviderInterface

Direct known implementers

Symfony\Component\Security\Core\User\AdvancedUserInterface

Indirect known implementers

Symfony\Component\Security\Core\User\User
Namespace: Symfony\Component\Security\Core\User
Author: Fabien Potencier <fabien@symfony.com>
See: Symfony\Component\Security\Core\User\UserProviderInterface
See: Symfony\Component\Security\Core\User\AdvancedUserInterface
Located at UserInterface.php
Methods summary
public Symfony\Component\Security\Core\Role\Role
# getRoles( )

Returns the roles granted to the user.

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

Symfony\Component\Security\Core\Role\Role
The user roles
public string
# getPassword( )

Returns the password used to authenticate the user.

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
public string|null
# getSalt( )

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

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|null
The salt
public string
# getUsername( )

Returns the username used to authenticate the user.

Returns the username used to authenticate the user.

Returns

string
The username
public
# eraseCredentials( )

Removes sensitive data from the user.

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.

Arbiter API documentation generated by ApiGen 2.8.0