PHP 클래스 Sulu\Bundle\SecurityBundle\UserManager\UserManager

상속: implements Sulu\Bundle\AdminBundle\UserManager\UserManagerInterface, use trait Sulu\Component\Persistence\RelationTrait
파일 보기 프로젝트 열기: sulu/sulu

보호된 프로퍼티들

프로퍼티 타입 설명
$contactManager Sulu\Bundle\ContactBundle\Contact\ContactManager
$em Doctrine\Common\Persistence\ObjectManager
$userRepository Sulu\Component\Security\Authentication\UserRepositoryInterface

공개 메소드들

메소드 설명
__construct ( Doctrine\Common\Persistence\ObjectManager $em, Symfony\Component\Security\Core\Encoder\EncoderFactory $encoderFactory = null, RoleRepository $roleRepository = null, GroupRepository $groupRepository = null, ContactManager $contactManager = null, SaltGenerator $saltGenerator = null, Sulu\Component\Security\Authentication\UserRepositoryInterface $userRepository = null )
delete ( ) : Closure Deletes a user with the given id.
enableUser ( integer $id ) : Sulu\Component\Security\Authentication\UserInterface
findAll ( ) : array Return all users.
findUserByContact ( integer $contactId ) : Sulu\Component\Security\Authentication\UserInterface Finds a user for a given contact id.
findUsersByAccount ( integer $accountId, $sortBy = [] ) : array Finds all users for the given account.
getFullNameByUserId ( integer $id ) : string returns fullName for given id.
getUserById ( integer $id ) : Sulu\Component\Security\Authentication\UserInterface Returns user for given id.
getUsernameByUserId ( integer $id ) : string Returns username for given id.
isEmailUnique ( string $email ) : boolean Checks if an email-adress is unique Null and empty will always return false.
isUsernameUnique ( string $username ) : boolean Checks if a username is unique Null and empty will always return false.
isValidPassword ( string $password ) : boolean Checks if the given password is a valid one.
processUserRoles ( Sulu\Component\Security\Authentication\UserInterface $user, array $userRoles ) : boolean Process all user roles from request.
save ( array $data, string $locale, null | integer $id = null, boolean $patch = false, boolean $flush = true ) : null | Sulu\Component\Security\Authentication\UserInterface Creates a new user with the given data.

보호된 메소드들

메소드 설명
processUserGroups ( Sulu\Component\Security\Authentication\UserInterface $user, $userGroups ) : boolean Process all user groups from request.

비공개 메소드들

메소드 설명
addUserGroup ( Sulu\Component\Security\Authentication\UserInterface $user, $userGroupData ) : boolean Adds a new UserGroup to the given user.
addUserRole ( Sulu\Component\Security\Authentication\UserInterface $user, $userRoleData ) : boolean Adds a new UserRole to the given user.
encodePassword ( Sulu\Component\Security\Authentication\UserInterface $user, string $password, string $salt ) : string Encodes the given password, for the given passwort, with he given salt and returns the result.
generateSalt ( ) : string Generates a random salt for the password.
getContact ( integer $id ) : Contact Returns the contact with the given id.
getProperty ( array $data, string $key, string $default = null ) : string | null Return property for key or given default value.
processEmail ( Sulu\Component\Security\Authentication\UserInterface $user, string $email, null | array $contact = null ) Processes the email and adds it to the user.
resetIndexOfSubentites ( mixed $entities ) : mixed this is just a hack to avoid relations that start with index != 0 otherwise deserialization process will parse relations as object instead of an array reindex entities.
updateUserGroup ( UserGroup $userGroup, $userGroupData ) : boolean Updates an existing UserGroup with the given data.
updateUserRole ( Sulu\Bundle\SecurityBundle\Entity\UserRole $userRole, $userRoleData ) : boolean Updates an existing UserRole with the given data.

메소드 상세

__construct() 공개 메소드

public __construct ( Doctrine\Common\Persistence\ObjectManager $em, Symfony\Component\Security\Core\Encoder\EncoderFactory $encoderFactory = null, RoleRepository $roleRepository = null, GroupRepository $groupRepository = null, ContactManager $contactManager = null, SaltGenerator $saltGenerator = null, Sulu\Component\Security\Authentication\UserRepositoryInterface $userRepository = null )
$em Doctrine\Common\Persistence\ObjectManager
$encoderFactory Symfony\Component\Security\Core\Encoder\EncoderFactory
$roleRepository Sulu\Bundle\SecurityBundle\Entity\RoleRepository
$groupRepository Sulu\Bundle\SecurityBundle\Entity\GroupRepository
$contactManager Sulu\Bundle\ContactBundle\Contact\ContactManager
$saltGenerator Sulu\Component\Security\Authentication\SaltGenerator
$userRepository Sulu\Component\Security\Authentication\UserRepositoryInterface

delete() 공개 메소드

Deletes a user with the given id.
public delete ( ) : Closure
리턴 Closure

enableUser() 공개 메소드

public enableUser ( integer $id ) : Sulu\Component\Security\Authentication\UserInterface
$id integer
리턴 Sulu\Component\Security\Authentication\UserInterface

findAll() 공개 메소드

Return all users.
public findAll ( ) : array
리턴 array

findUserByContact() 공개 메소드

Finds a user for a given contact id.
public findUserByContact ( integer $contactId ) : Sulu\Component\Security\Authentication\UserInterface
$contactId integer
리턴 Sulu\Component\Security\Authentication\UserInterface

findUsersByAccount() 공개 메소드

Finds all users for the given account.
public findUsersByAccount ( integer $accountId, $sortBy = [] ) : array
$accountId integer
리턴 array

getFullNameByUserId() 공개 메소드

returns fullName for given id.
public getFullNameByUserId ( integer $id ) : string
$id integer userId
리턴 string

getUserById() 공개 메소드

Returns user for given id.
public getUserById ( integer $id ) : Sulu\Component\Security\Authentication\UserInterface
$id integer userId
리턴 Sulu\Component\Security\Authentication\UserInterface

getUsernameByUserId() 공개 메소드

Returns username for given id.
public getUsernameByUserId ( integer $id ) : string
$id integer userId
리턴 string

isEmailUnique() 공개 메소드

Checks if an email-adress is unique Null and empty will always return false.
public isEmailUnique ( string $email ) : boolean
$email string
리턴 boolean

isUsernameUnique() 공개 메소드

Checks if a username is unique Null and empty will always return false.
public isUsernameUnique ( string $username ) : boolean
$username string
리턴 boolean

isValidPassword() 공개 메소드

Checks if the given password is a valid one.
public isValidPassword ( string $password ) : boolean
$password string The password to check
리턴 boolean True if the password is valid, otherwise false

processUserGroups() 보호된 메소드

Process all user groups from request.
protected processUserGroups ( Sulu\Component\Security\Authentication\UserInterface $user, $userGroups ) : boolean
$user Sulu\Component\Security\Authentication\UserInterface
$userGroups
리턴 boolean True if the processing was successful, otherwise false

processUserRoles() 공개 메소드

Process all user roles from request.
public processUserRoles ( Sulu\Component\Security\Authentication\UserInterface $user, array $userRoles ) : boolean
$user Sulu\Component\Security\Authentication\UserInterface
$userRoles array
리턴 boolean True if the processing was successful, otherwise false

save() 공개 메소드

Creates a new user with the given data.
public save ( array $data, string $locale, null | integer $id = null, boolean $patch = false, boolean $flush = true ) : null | Sulu\Component\Security\Authentication\UserInterface
$data array
$locale string
$id null | integer
$patch boolean
$flush boolean
리턴 null | Sulu\Component\Security\Authentication\UserInterface

프로퍼티 상세

$contactManager 보호되어 있는 프로퍼티

protected ContactManager,Sulu\Bundle\ContactBundle\Contact $contactManager
리턴 Sulu\Bundle\ContactBundle\Contact\ContactManager

$em 보호되어 있는 프로퍼티

protected ObjectManager,Doctrine\Common\Persistence $em
리턴 Doctrine\Common\Persistence\ObjectManager

$userRepository 보호되어 있는 프로퍼티

protected UserRepositoryInterface,Sulu\Component\Security\Authentication $userRepository
리턴 Sulu\Component\Security\Authentication\UserRepositoryInterface