class UserService implements UserServiceInterface

Main services related to User

Properties

private ConfigServiceInterface $configService Stores ConfigServiceInterface
private EntityManagerInterface $em Stores EntityManagerInterface
private UserPasswordEncoderInterface $passwordEncoder Stores UserPasswordEncoderInterface
private Request $request Stores curent Request
private RouterInterface $router Stores RouterInterface
private UserEmailInterface $userEmail Stores UserEmailInterface
private ServiceToolsInterface $serviceTools Stores ServiceToolsInterface

Methods

__construct(ConfigServiceInterface $configService, EntityManagerInterface $em, UserPasswordEncoderInterface $passwordEncoder, RequestStack $requestStack, RouterInterface $router, ServiceToolsInterface $serviceTools, UserEmailInterface $userEmail)

No description

add($user)

Adds the user

array
addAttempt($error)

Adds attempt for signin

addRole($user, string $role)

Adds role to user

archive($userId)

Archives the user using Stored Procedure

checkProfile($user)

Checks if profile is well filled

delete($user)

Deletes the user

deleteRole($user, string $role)

Deletes role to user

Response
export($user, $format)

Exports user's data

findUserByEmail($email)

Finds user by email

findUserById($id)

Finds user by id

findUserByIdentifier($identifier)

Finds user by identifier

findUserBySocialId($socialId)

Finds user by socialId

findUserByToken($token)

Finds user by token

array
getUsersAll()

Gets all the users

string
getUserEntity()

Gets the User entity used

modify($user)

Modifies the user

modifyRoles($user, array $roles)

Modifies role to user

signup($user)

Registers the user

signupConfirm($user)

Confirms user's signup

Details

at line 79
__construct(ConfigServiceInterface $configService, EntityManagerInterface $em, UserPasswordEncoderInterface $passwordEncoder, RequestStack $requestStack, RouterInterface $router, ServiceToolsInterface $serviceTools, UserEmailInterface $userEmail)

Parameters

ConfigServiceInterface $configService
EntityManagerInterface $em
UserPasswordEncoderInterface $passwordEncoder
RequestStack $requestStack
RouterInterface $router
ServiceToolsInterface $serviceTools
UserEmailInterface $userEmail

at line 101
add($user)

Adds the user

Parameters

$user

at line 122
array addAttempt($error)

Adds attempt for signin

Parameters

$error

Return Value

array

at line 167
addRole($user, string $role)

Adds role to user

Parameters

$user
string $role

at line 178
archive($userId)

Archives the user using Stored Procedure

Parameters

$userId

at line 192
checkProfile($user)

Checks if profile is well filled

Parameters

$user

at line 210
delete($user)

Deletes the user

Parameters

$user

at line 229
deleteRole($user, string $role)

Deletes role to user

Parameters

$user
string $role

at line 240
Response export($user, $format)

Exports user's data

Parameters

$user
$format

Return Value

Response

at line 283
UserLight findUserByEmail($email)

Finds user by email

Parameters

$email

Return Value

UserLight

at line 295
UserLight findUserById($id)

Finds user by id

Parameters

$id

Return Value

UserLight

at line 307
UserLight findUserByIdentifier($identifier)

Finds user by identifier

Parameters

$identifier

Return Value

UserLight

at line 319
UserLight findUserBySocialId($socialId)

Finds user by socialId

Parameters

$socialId

Return Value

UserLight

at line 331
UserLight findUserByToken($token)

Finds user by token

Parameters

$token

Return Value

UserLight

at line 343
array getUsersAll()

Gets all the users

Return Value

array

at line 354
string getUserEntity()

Gets the User entity used

Return Value

string

at line 362
modify($user)

Modifies the user

Parameters

$user

at line 381
modifyRoles($user, array $roles)

Modifies role to user

Parameters

$user
array $roles

at line 394
signup($user)

Registers the user

Parameters

$user

at line 413
signupConfirm($user)

Confirms user's signup

Parameters

$user