PHP Class PartKeepr\AuthBundle\Services\UserService

ファイルを表示 Open project: partkeepr/PartKeepr Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage $tokenStorage, EntityManager $entityManager, FOS\UserBundle\Util\UserManipulator $userManipulator, FOS\UserBundle\Model\UserManagerInterface $userManager, $userLimit = false )
checkUserLimit ( ) : boolean Checks if the amount of users is exceeded.
deleteFOSUser ( User $user ) Deletes an user from the FOSUser system.
getBuiltinProvider ( )
getProvider ( $providerClass )
getProviderByType ( $type )
getProviderTypeByClass ( $providerClass )
getProxyUser ( $username, UserProvider $provider, boolean | false $create = false ) : mixed | User Returns the proxy user for a given username and provider.
getUser ( ) : User Returns the PartKeeprUser based on the user token within the Symfony2 environment.
getUserCount ( ) : mixed Returns the number of users present in the system.
protect ( User $user ) Protects a given user against changes.
syncData ( User $user ) Syncronizes the data of the given user with the FOSRestBundle.
unprotect ( User $user ) Unprotects a given user against changes.

Private Methods

Method Description
createProxyUser ( $username, $provider )

Method Details

__construct() public method

public __construct ( Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage $tokenStorage, EntityManager $entityManager, FOS\UserBundle\Util\UserManipulator $userManipulator, FOS\UserBundle\Model\UserManagerInterface $userManager, $userLimit = false )
$tokenStorage Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage
$entityManager Doctrine\ORM\EntityManager
$userManipulator FOS\UserBundle\Util\UserManipulator
$userManager FOS\UserBundle\Model\UserManagerInterface

checkUserLimit() public method

Checks if the amount of users is exceeded.
public checkUserLimit ( ) : boolean
return boolean

deleteFOSUser() public method

Deletes an user from the FOSUser system.
public deleteFOSUser ( User $user )
$user PartKeepr\AuthBundle\Entity\User

getBuiltinProvider() public method

public getBuiltinProvider ( )

getProvider() public method

public getProvider ( $providerClass )

getProviderByType() public method

public getProviderByType ( $type )

getProviderTypeByClass() public method

public getProviderTypeByClass ( $providerClass )

getProxyUser() public method

Returns the proxy user for a given username and provider.
public getProxyUser ( $username, UserProvider $provider, boolean | false $create = false ) : mixed | User
$username
$provider PartKeepr\AuthBundle\Entity\UserProvider
$create boolean | false If set to true
return mixed | PartKeepr\AuthBundle\Entity\User

getUser() public method

Returns the PartKeeprUser based on the user token within the Symfony2 environment.
public getUser ( ) : User
return PartKeepr\AuthBundle\Entity\User The proxy user

getUserCount() public method

Returns the number of users present in the system.
public getUserCount ( ) : mixed
return mixed

protect() public method

Protects a given user against changes.
public protect ( User $user )
$user PartKeepr\AuthBundle\Entity\User

syncData() public method

Syncronizes the data of the given user with the FOSRestBundle.
public syncData ( User $user )
$user PartKeepr\AuthBundle\Entity\User

unprotect() public method

Unprotects a given user against changes.
public unprotect ( User $user )
$user PartKeepr\AuthBundle\Entity\User