Skip to content

Commit 2c40744

Browse files
committed
Optimization
1 parent 62dfcb0 commit 2c40744

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Interfaces/UserInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ public function getPassword();
1212
public function getEmail();
1313
public function getFullName();
1414
public function getToken();
15+
public function setPassword($password);
1516
}

src/Service/UserManager.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ public function checkUserExists($email) {
184184

185185
/**
186186
* Checks that the given password is correct.
187-
* @param User $user
187+
* @param UserInterface $user
188188
* @param $password
189189
* @return bool
190190
*/
191-
public function validatePassword(User $user, $password)
191+
public function validatePassword(UserInterface $user, $password)
192192
{
193193
$passwordHash = $user->getPassword();
194194

@@ -293,11 +293,11 @@ public function setNewPasswordByToken($passwordResetToken, $newPassword)
293293
* This method is used to change the password for the given user. To change the password,
294294
* one must know the old password.
295295
*
296-
* @param User $user
296+
* @param UserInterface $user
297297
* @param $data
298298
* @return bool
299299
*/
300-
public function changePassword(User $user, $data)
300+
public function changePassword(UserInterface $user, $data)
301301
{
302302
$oldPassword = $data['old_password'];
303303

0 commit comments

Comments
 (0)