Documentation

UpdateUser
in package

Table of Contents

Properties

$passwordHasher  : PasswordHasher
$userRepository  : UserRepositoryInterface

Methods

__construct()  : mixed
execute()  : array{success: bool, errors?: string[]}
Update an existing user.

Properties

Methods

execute()

Update an existing user.

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

The user ID to update

$currentAdminId : int

The ID of the admin performing the update

$username : string

New username

$email : string

New email

$password : string = ''

New password (empty to skip)

$role : string = User::ROLE_USER

New role

$isActive : bool = true

New active status

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

        
On this page

Search results