Private
Public Access
1
0

chg: dev: increase the minimum PHP version to the latest major - and massive refactor on back-end, like Controllers and Repositories #4

This commit is contained in:
2026-04-12 08:01:46 +02:00
parent 92bfa5b301
commit c0dcc2896a
12 changed files with 511 additions and 104 deletions

View File

@@ -16,6 +16,7 @@ use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Attribute\AsController;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
use Symfony\Component\Routing\Attribute\Route;
@@ -32,6 +33,7 @@ use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
* @link www.splendidbear.org
* @since 2026. 04. 11.
*/
#[AsController]
class SecurityController extends AbstractController
{
#[Route('/login', name: 'MineSeekerBundle_login')]
@@ -93,7 +95,7 @@ class SecurityController extends AbstractController
if (empty($errors)) {
$token = bin2hex(random_bytes(32));
$user = (new User())
$user = new User()
->setUsername($username)
->setEmail($email)
->setIsVerified(false)
@@ -111,7 +113,7 @@ class SecurityController extends AbstractController
);
$mailer->send(
(new TemplatedEmail())
new TemplatedEmail()
->from('noreply@mineseeker.ninja')
->to($email)
->subject('Activate your MineSeeker account')
@@ -152,4 +154,4 @@ class SecurityController extends AbstractController
return $this->redirectToRoute('MineSeekerBundle_login');
}
}
}