mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-26 06:37:38 +02:00
Redesign du site
This commit is contained in:
@ -6,7 +6,7 @@ if (isset($_SESSION["team"]) || !isset($_SESSION["user"]) || ($_SESSION["role"]
|
||||
$has_error = false;
|
||||
$error_message = null;
|
||||
|
||||
if (isset($_POST["submitted"])) {
|
||||
if (isset($_POST["join_team"])) {
|
||||
$join_team = new JoinTeam($_POST);
|
||||
try {
|
||||
$join_team->makeVerifications();
|
||||
@ -47,6 +47,8 @@ class JoinTeam
|
||||
|
||||
public function joinTeam()
|
||||
{
|
||||
global $team;
|
||||
|
||||
$user = $_SESSION["user"];
|
||||
|
||||
$user->setTeamId($this->team->getId());
|
||||
@ -56,7 +58,7 @@ class JoinTeam
|
||||
else
|
||||
$this->team->setParticipant($this->min_null_index, $user->getId());
|
||||
|
||||
$_SESSION["team"] = $this->team;
|
||||
$team = $_SESSION["team"] = $this->team;
|
||||
$tournament = $_SESSION["tournament"] = Tournament::fromId($this->team->getTournamentId());
|
||||
|
||||
Mailer::sendJoinTeamMail($user, $this->team, $tournament);
|
||||
|
Reference in New Issue
Block a user