Documentation

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

$activateFormCompanyUser read-only

private Activate $activateFormCompanyUser

$bcrypt read-only

private Bcrypt $bcrypt

$emailService read-only

private Email $emailService

$passwordFormCompanyUser read-only

private Password $passwordFormCompanyUser

$translator read-only

private Translator $translator

$userMapper read-only

private User $userMapper

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
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
bool

changePassword()

Change the password of a user.

public changePassword(array<string|int, mixed> $data) : bool
Parameters
$data : array<string|int, mixed>
Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
bool

companyLogin()

Log the company in.

public companyLogin(array<string|int, mixed> $data) : CompanyUser|null
Parameters
$data : array<string|int, mixed>
Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
CompanyUser|null

generateCode()

Generate an activation code for the user.

public static generateCode([int $length = 48 ]) : string
Parameters
$length : int = 48
Return values
string

getActivateForm()

Get the activate form.

public getActivateForm(string $userType) : Activate
Parameters
$userType : string
Return values
Activate

Activate form

getNewCompanyUser()

Get the new company user.

public getNewCompanyUser(string $code) : NewCompanyUser|null
Parameters
$code : string
Return values
NewCompanyUser|null

getNewUser()

Get the new user.

public getNewUser(string $code) : NewUser|null
Parameters
$code : string
Return values
NewUser|null

getPasswordForm()

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

logout()

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
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

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

resetCompany()

Request a password reset for a company.

public resetCompany(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>
Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

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
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

userLogin()

Log the user in.

public userLogin(array<string|int, mixed> $data) : User|null
Parameters
$data : array<string|int, mixed>
Tags
phpcsSuppress

SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification

Return values
User|null

        
On this page

Search results