mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 12:44:20 +01:00
Implement email verification feature, add registration form, and update user entity for verification status
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user