PHP Interface FOS\UserBundle\Model\UserManagerInterface

All changes to users should happen through this interface. The class also contains ACL annotations which will only work if you have the SecurityExtraBundle installed, otherwise they will simply be ignored.
Author: Gordon Franke ([email protected])
Author: Thibault Duplessis ([email protected])
Author: Johannes M. Schmitt ([email protected])
Afficher le fichier Open project: KnpLabs/KnpUserBundle Interface Usage Examples

Méthodes publiques

Méthode Description
createUser ( ) : User Creates an empty user instance
deleteUser ( FOS\UserBundle\Model\UserInterface $user ) : void Deletes a user
findUserBy ( array $criteria ) : User Finds one user by the given criteria
findUserByConfirmationToken ( string $token ) : User Find a user by its confirmationToken
findUserByEmail ( string $email ) : User Find a user by its email
findUserByUsername ( string $username ) : User Find a user by its username
findUserByUsernameOrEmail ( string $usernameOrEmail ) : User Find a user by its username or email
findUsers ( ) : Traversable Returns a collection with all user instances
getClass ( ) : string Returns the user's fully qualified class name
updateCanonicalFields ( FOS\UserBundle\Model\UserInterface $user ) : void Updates the canonical username and email fields for a user
updatePassword ( FOS\UserBundle\Model\UserInterface $user ) : void Updates a user password if a plain password is set
updateUser ( FOS\UserBundle\Model\UserInterface $user ) : void Updates a user
validateUnique ( FOS\UserBundle\Model\UserInterface $value, Constraint $constraint ) : boolean Checks the uniqueness of the given fields, returns true if its unique

Method Details

createUser() public méthode

Creates an empty user instance
public createUser ( ) : User
Résultat User

deleteUser() public méthode

Deletes a user
public deleteUser ( FOS\UserBundle\Model\UserInterface $user ) : void
$user FOS\UserBundle\Model\UserInterface
Résultat void

findUserBy() public méthode

Finds one user by the given criteria
public findUserBy ( array $criteria ) : User
$criteria array
Résultat User

findUserByConfirmationToken() public méthode

Find a user by its confirmationToken
public findUserByConfirmationToken ( string $token ) : User
$token string
Résultat User or null if user does not exist

findUserByEmail() public méthode

Find a user by its email
public findUserByEmail ( string $email ) : User
$email string
Résultat User or null if user does not exist

findUserByUsername() public méthode

Find a user by its username
public findUserByUsername ( string $username ) : User
$username string
Résultat User or null if user does not exist

findUserByUsernameOrEmail() public méthode

Find a user by its username or email
public findUserByUsernameOrEmail ( string $usernameOrEmail ) : User
$usernameOrEmail string
Résultat User or null if user does not exist

findUsers() public méthode

Returns a collection with all user instances
public findUsers ( ) : Traversable
Résultat Traversable

getClass() public méthode

Returns the user's fully qualified class name
public getClass ( ) : string
Résultat string

updateCanonicalFields() public méthode

Updates the canonical username and email fields for a user
public updateCanonicalFields ( FOS\UserBundle\Model\UserInterface $user ) : void
$user FOS\UserBundle\Model\UserInterface
Résultat void

updatePassword() public méthode

Updates a user password if a plain password is set
public updatePassword ( FOS\UserBundle\Model\UserInterface $user ) : void
$user FOS\UserBundle\Model\UserInterface
Résultat void

updateUser() public méthode

Updates a user
public updateUser ( FOS\UserBundle\Model\UserInterface $user ) : void
$user FOS\UserBundle\Model\UserInterface
Résultat void

validateUnique() public méthode

Checks the uniqueness of the given fields, returns true if its unique
public validateUnique ( FOS\UserBundle\Model\UserInterface $value, Constraint $constraint ) : boolean
$value FOS\UserBundle\Model\UserInterface
$constraint Symfony\Component\Validator\Constraint
Résultat boolean