PHP Class Sulu\Bundle\SecurityBundle\Entity\UserRepository

Inheritance: extends Sulu\Component\Persistence\Repository\ORM\EntityRepository, implements Sulu\Component\Security\Authentication\UserRepositoryInterface, use trait Sulu\Component\Persistence\Repository\ORM\OrderByTrait
Afficher le fichier Open project: sulu/sulu Class Usage Examples

Méthodes publiques

Méthode Description
findAllUsersByRoleId ( integer $roleId ) : array Finds all users for the role with the given id.
findUserByContact ( $id ) : array Searches for a user with a specific contact id.
findUserByEmail ( string $email ) : Symfony\Component\Security\Core\User\UserInterface Finds a user for a given email.
findUserById ( $id )
findUserByIdentifier ( $identifier )
findUserBySystem ( string $system ) : User[] Returns all users with the given system including their contacts.
findUserByToken ( string $token ) : Symfony\Component\Security\Core\User\UserInterface Finds a user for a given password-reset-token.
findUserByUsername ( string $username ) : Symfony\Component\Security\Core\User\UserInterface Finds a user for the given username.
findUserWithSecurityById ( $id )
findUsersByAccount ( $accountId, $sortBy = [] )
getUsernameByApiKey ( string $apiKey ) : string returns username for given apiKey.

Private Methods

Méthode Description
getUserWithPermissionsQuery ( ) : Doctrine\ORM\QueryBuilder Returns the query for the user with the joins for retrieving the permissions. Especially useful for security related queries.

Method Details

findAllUsersByRoleId() public méthode

Finds all users for the role with the given id.
public findAllUsersByRoleId ( integer $roleId ) : array
$roleId integer
Résultat array

findUserByContact() public méthode

Searches for a user with a specific contact id.
public findUserByContact ( $id ) : array
$id
Résultat array

findUserByEmail() public méthode

Finds a user for a given email.
public findUserByEmail ( string $email ) : Symfony\Component\Security\Core\User\UserInterface
$email string The email-address
Résultat Symfony\Component\Security\Core\User\UserInterface

findUserById() public méthode

public findUserById ( $id )

findUserByIdentifier() public méthode

public findUserByIdentifier ( $identifier )

findUserBySystem() public méthode

Returns all users with the given system including their contacts.
public findUserBySystem ( string $system ) : User[]
$system string
Résultat User[]

findUserByToken() public méthode

Finds a user for a given password-reset-token.
public findUserByToken ( string $token ) : Symfony\Component\Security\Core\User\UserInterface
$token string the reset-token
Résultat Symfony\Component\Security\Core\User\UserInterface

findUserByUsername() public méthode

This method throws UsernameNotFoundException if the user is not found.
public findUserByUsername ( string $username ) : Symfony\Component\Security\Core\User\UserInterface
$username string The username
Résultat Symfony\Component\Security\Core\User\UserInterface

findUserWithSecurityById() public méthode

public findUserWithSecurityById ( $id )

findUsersByAccount() public méthode

public findUsersByAccount ( $accountId, $sortBy = [] )

getUsernameByApiKey() public méthode

returns username for given apiKey.
public getUsernameByApiKey ( string $apiKey ) : string
$apiKey string userId
Résultat string