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
Show file Open project: sulu/sulu Class Usage Examples

Public Methods

Method 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

Method 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 method

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

findUserByContact() public method

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

findUserByEmail() public method

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

findUserById() public method

public findUserById ( $id )

findUserByIdentifier() public method

public findUserByIdentifier ( $identifier )

findUserBySystem() public method

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

findUserByToken() public method

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

findUserByUsername() public method

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

findUserWithSecurityById() public method

public findUserWithSecurityById ( $id )

findUsersByAccount() public method

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

getUsernameByApiKey() public method

returns username for given apiKey.
public getUsernameByApiKey ( string $apiKey ) : string
$apiKey string userId
return string