lowercase login user

This commit is contained in:
tracer 2022-10-26 13:14:29 +02:00
parent 32dcab7592
commit 7ee8e8860e
1 changed files with 1 additions and 0 deletions

View File

@ -32,6 +32,7 @@ class SecurityController
$password = $_POST['password'] ?? '';
if ($nick && $password) {
$nick = strtolower(string: $nick);
if ($user = $this->userRepository->findbyNick(nick: $nick)) {
if (password_verify(password: $password, hash: $user->getPassword())) {
$_SESSION['user_id'] = $user->getId();