tournament controls
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s

This commit is contained in:
2023-10-26 21:18:32 +02:00
parent 135958c9f0
commit 00c2e1ded6
6 changed files with 217 additions and 59 deletions

View File

@ -14,4 +14,17 @@ class Tournament extends Model
'logo' => ['type' => 'text', 'default' => 'https://pictshare.net/prrnrk.jpg']
);
function isMyEvent($tournament = false)
{
if ($tournament == false)
$tournament = $this->id;
if (!$this->exists($tournament))
return false;
else {
if (in_array($tournament, $_SESSION['user']->data['tournaments']))
return true;
else return false;
}
}
}