mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2025-09-09 19:37:12 +02:00
Added addUser function to repository
This commit is contained in:
@@ -54,6 +54,15 @@ final class User implements UserInterface
|
||||
{
|
||||
$this->passwordHash = $hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* In a real application you should use a salt ;)
|
||||
* @param string $password
|
||||
*/
|
||||
public function setPasswordHashByPassword(string $password): void
|
||||
{
|
||||
$this->passwordHash = password_hash($password, PASSWORD_BCRYPT);
|
||||
}
|
||||
|
||||
public function getEmail(): string
|
||||
{
|
||||
|
Reference in New Issue
Block a user