function canCreateDeck($username) { if (strcasecmp($username, $this->player->name) == 0) { return true; } $player = new Player($username); if ($player->isSuper()) { return true; } return $this->event->isHost($username) || $this->event->isSteward($username); }
function canEdit($username) { if (strcasecmp($username, $this->playername) == 0) { return true; } $player = new Player($username); if ($player->isSuper()) { return true; } $event = $this->getEvent(); return $event->isHost($username) || $event->isSteward($username); }
function authCheck($player) { $playername = $player; if (is_object($player)) { $playername = $player->name; } $series = new Series($this->series); if ($this->isHost($playername) || $this->isSteward($playername) || $series->isSteward($playername)) { return true; } $player = new Player($playername); return $player->isSuper(); }
function authCheck($playername) { if ($this->isSteward($playername)) { return true; } $player = new Player($playername); return $player->isSuper(); }