Added addUser function to repository

This commit is contained in:
Kevin Frantz
2018-07-15 09:51:48 +02:00
parent 2e1394f96a
commit 80be8e7361
6 changed files with 53 additions and 9 deletions

View File

@@ -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
{