Documentation

CreateUser
in package

Table of Contents

Properties

$passwordHasher  : PasswordHasher
$userRepository  : UserRepositoryInterface

Methods

__construct()  : mixed
execute()  : array{success: bool, user_id?: int, errors?: string[]}
Create a new user.

Properties

Methods

execute()

Create a new user.

public execute(string $username, string $email, string $password[, string $role = User::ROLE_USER ][, bool $isActive = true ]) : array{success: bool, user_id?: int, errors?: string[]}
Parameters
$username : string

Username

$email : string

Email address

$password : string

Plain-text password

$role : string = User::ROLE_USER

User role (user or admin)

$isActive : bool = true

Whether the user is active

Return values
array{success: bool, user_id?: int, errors?: string[]}

        
On this page

Search results