Documentation

ChangePassword

Use case for changing a user's password (requires current password).

Tags
since
3.0.0

Table of Contents

Properties

$passwordHasher  : PasswordHasher
$repository  : UserRepositoryInterface

Methods

__construct()  : mixed
execute()  : void
Change the user's password.

Properties

Methods

execute()

Change the user's password.

public execute(User $user, string $currentPassword, string $newPassword) : void
Parameters
$user : User

The user

$currentPassword : string

Current password for verification

$newPassword : string

New password

Tags
throws
InvalidArgumentException

If current password is wrong or new password is weak


        
On this page

Search results