Implement email verification feature, add registration form, and update user entity for verification status

This commit is contained in:
2025-04-20 19:34:27 +02:00
parent c70f713f7e
commit 4bcab2724a
40 changed files with 1149 additions and 269 deletions

View File

@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace App\Repository;
use App\Entity\Season;
use App\Entity\User;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
@@ -17,4 +18,15 @@ class SeasonRepository extends ServiceEntityRepository
{
parent::__construct($registry, Season::class);
}
/** @return list<Season> Returns an array of Season objects */
public function getSeasonsForUser(User $user): array
{
$qb = $this->createQueryBuilder('s')
->where(':user MEMBER OF s.owners')
->orderBy('s.name')
->setParameter('user', $user);
return $qb->getQuery()->getResult();
}
}

View File

@@ -22,7 +22,9 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
parent::__construct($registry, User::class);
}
/** Used to upgrade (rehash) the user's password automatically over time. */
/** Used to upgrade (rehash) the user's password automatically over time.
* @param User $user
* */
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
{
$user->setPassword($newHashedPassword);