User
in package
User service.
Table of Contents
Properties
- $aclService : AclService
- $activateFormCompanyUser : Activate
- $activateFormUser : Activate
- $bcrypt : Bcrypt
- $companyUserAuthService : AuthenticationService
- $companyUserLoginForm : CompanyUserLogin
- $companyUserMapper : CompanyUser
- $companyUserResetForm : CompanyUserReset
- $emailService : Email
- $memberMapper : Member
- $newCompanyUserMapper : NewCompanyUser
- $newUserMapper : NewUser
- $passwordFormCompanyUser : Password
- $passwordFormUser : Password
- $pwnedPasswordsService : PwnedPasswords
- $registerForm : Register
- $translator : Translator
- $userAuthService : AuthenticationService
- $userLoginForm : UserLogin
- $userMapper : User
- $userResetForm : UserReset
Methods
- __construct() : mixed
- activate() : bool
- Activate a user.
- changePassword() : bool
- Change the password of a user.
- companyLogin() : CompanyUser|null
- Log the company in.
- generateCode() : string
- Generate an activation code for the user.
- getActivateForm() : Activate
- Get the activate form.
- getCompanyUserLoginForm() : CompanyUserLogin
- getCompanyUserResetForm() : CompanyUserReset
- getNewCompanyUser() : NewCompanyUser|null
- Get the new company user.
- getNewUser() : NewUser|null
- Get the new user.
- getPasswordForm() : Password
- Get the password form.
- getRegisterForm() : Register
- Get the register form.
- getUserLoginForm() : UserLogin
- Get the login form.
- getUserResetForm() : UserReset
- Get the reset form.
- logout() : void
- Log the user out.
- register() : NewUser|null
- Register a user.
- registerCompanyUser() : void
- Register a company.
- removeActivation() : void
- Remove an activation request.
- resetCompany() : void
- Request a password reset for a company.
- resetMember() : void
- Request a password reset for a member.
- userLogin() : User|null
- Log the user in.
Properties
$aclService read-only
private
AclService
$aclService
$activateFormCompanyUser read-only
private
Activate
$activateFormCompanyUser
$activateFormUser read-only
private
Activate
$activateFormUser
$bcrypt read-only
private
Bcrypt
$bcrypt
$companyUserAuthService read-only
private
AuthenticationService
$companyUserAuthService
$companyUserLoginForm read-only
private
CompanyUserLogin
$companyUserLoginForm
$companyUserMapper read-only
private
CompanyUser
$companyUserMapper
$companyUserResetForm read-only
private
CompanyUserReset
$companyUserResetForm
$emailService read-only
private
Email
$emailService
$memberMapper read-only
private
Member
$memberMapper
$newCompanyUserMapper read-only
private
NewCompanyUser
$newCompanyUserMapper
$newUserMapper read-only
private
NewUser
$newUserMapper
$passwordFormCompanyUser read-only
private
Password
$passwordFormCompanyUser
$passwordFormUser read-only
private
Password
$passwordFormUser
$pwnedPasswordsService read-only
private
PwnedPasswords
$pwnedPasswordsService
$registerForm read-only
private
Register
$registerForm
$translator read-only
private
Translator
$translator
$userAuthService read-only
private
AuthenticationService
$userAuthService
$userLoginForm read-only
private
UserLogin
$userLoginForm
$userMapper read-only
private
User
$userMapper
$userResetForm read-only
private
UserReset
$userResetForm
Methods
__construct()
public
__construct(AclService $aclService, Translator $translator, Bcrypt $bcrypt, AuthenticationService $userAuthService, AuthenticationService $companyUserAuthService, Email $emailService, PwnedPasswords $pwnedPasswordsService, CompanyUser $companyUserMapper, User $userMapper, NewUser $newUserMapper, NewCompanyUser $newCompanyUserMapper, Member $memberMapper, Register $registerForm, Activate $activateFormCompanyUser, Activate $activateFormUser, UserLogin $userLoginForm, CompanyUserLogin $companyUserLoginForm, CompanyUserReset $companyUserResetForm, Password $passwordFormCompanyUser, Password $passwordFormUser, UserReset $userResetForm) : mixed
Parameters
- $aclService : AclService
- $translator : Translator
- $bcrypt : Bcrypt
- $userAuthService : AuthenticationService
- $companyUserAuthService : AuthenticationService
- $emailService : Email
- $pwnedPasswordsService : PwnedPasswords
- $companyUserMapper : CompanyUser
- $userMapper : User
- $newUserMapper : NewUser
- $newCompanyUserMapper : NewCompanyUser
- $memberMapper : Member
- $registerForm : Register
- $activateFormCompanyUser : Activate
- $activateFormUser : Activate
- $userLoginForm : UserLogin
- $companyUserLoginForm : CompanyUserLogin
- $companyUserResetForm : CompanyUserReset
- $passwordFormCompanyUser : Password
- $passwordFormUser : Password
- $userResetForm : UserReset
activate()
Activate a user.
public
activate(array<string|int, mixed> $data, NewCompanyUser|NewUser $newUser, string $userType) : bool
Parameters
- $data : array<string|int, mixed>
- $newUser : NewCompanyUser|NewUser
- $userType : string
Tags
Return values
boolchangePassword()
Change the password of a user.
public
changePassword(array<string|int, mixed> $data) : bool
Parameters
- $data : array<string|int, mixed>
Tags
Return values
boolcompanyLogin()
Log the company in.
public
companyLogin(array<string|int, mixed> $data) : CompanyUser|null
Parameters
- $data : array<string|int, mixed>
Tags
Return values
CompanyUser|nullgenerateCode()
Generate an activation code for the user.
public
static generateCode([int $length = 48 ]) : string
Parameters
- $length : int = 48
Return values
stringgetActivateForm()
Get the activate form.
public
getActivateForm(string $userType) : Activate
Parameters
- $userType : string
Return values
Activate —Activate form
getCompanyUserLoginForm()
public
getCompanyUserLoginForm() : CompanyUserLogin
Return values
CompanyUserLogingetCompanyUserResetForm()
public
getCompanyUserResetForm() : CompanyUserReset
Return values
CompanyUserResetgetNewCompanyUser()
Get the new company user.
public
getNewCompanyUser(string $code) : NewCompanyUser|null
Parameters
- $code : string
Return values
NewCompanyUser|nullgetNewUser()
Get the new user.
public
getNewUser(string $code) : NewUser|null
Parameters
- $code : string
Return values
NewUser|nullgetPasswordForm()
Get the password form.
public
getPasswordForm(string $userType) : Password
Parameters
- $userType : string
Return values
Password —Password change form
getRegisterForm()
Get the register form.
public
getRegisterForm() : Register
Return values
Register —Register form
getUserLoginForm()
Get the login form.
public
getUserLoginForm() : UserLogin
Return values
UserLogin —UserLogin form
getUserResetForm()
Get the reset form.
public
getUserResetForm() : UserReset
Return values
UserResetlogout()
Log the user out.
public
logout() : void
register()
Register a user.
public
register(array<string|int, mixed> $data) : NewUser|null
Will also send an email to the user.
Parameters
- $data : array<string|int, mixed>
-
Registration data
Tags
Return values
NewUser|null —New registered user. Null when the user could not be registered.
registerCompanyUser()
Register a company.
public
registerCompanyUser(Company $company) : void
TODO: Re-enable functionality once company module overhaul is finished.
Parameters
- $company : Company
removeActivation()
Remove an activation request.
public
removeActivation(NewCompanyUser|NewUser $newUser) : void
Parameters
- $newUser : NewCompanyUser|NewUser
resetCompany()
Request a password reset for a company.
public
resetCompany(array<string|int, mixed> $data) : void
Parameters
- $data : array<string|int, mixed>
Tags
resetMember()
Request a password reset for a member.
public
resetMember(array<string|int, mixed> $data) : void
Will also send an email to the user.
Parameters
- $data : array<string|int, mixed>
Tags
userLogin()
Log the user in.
public
userLogin(array<string|int, mixed> $data) : User|null
Parameters
- $data : array<string|int, mixed>