app\models\Tournament::register PHP Method

register() public method

public register ( $user )
    public function register($user)
    {
        if ($this->isSignedUp($user)) {
            return;
        }
        //sanity check: we shouldn't be touching users once the tournament is already in action.
        if ($this->isTournamentRunning()) {
            return;
        }
        $reg = new TournamentRegistration();
        $reg->user()->associate($user);
        $this->registrations()->save($reg);
    }