Block unverified users from marking themselves ready
GameDashboardService::toggleReady() now rejects the toggle if the user's email isn't verified (mirrors the same gate UserChecker already applies at login). The waiting-room checkbox is disabled client-side with an explanatory alert and a link to resend the verification email, and the controller adds a flash error as a server-side fallback if it somehow gets submitted anyway.
This commit is contained in:
@@ -290,6 +290,10 @@ final class GameDashboardService
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$user->isVerified()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$player = null;
|
||||
foreach ($session->getPlayers() as $p) {
|
||||
if ($p->getUser() === $user) {
|
||||
|
||||
Reference in New Issue
Block a user