public function ActionNext() { $login = Auth::GetLogin(); $state = State::FindByColumn('login', $login); $state->Next(); header('location: /beginner'); }
public function init() { //если не авторизован перенаврабляем на страницу авторизации if (!Auth::IsAuth()) { header('location: /visitor/login'); die; } $this->view = new View(); $this->view->notification = Notification::Get(); $stats = Stats::FindByColumn('login', Auth::GetLogin()); if ($stats === false) { Auth::Logout(); header('location: /visitor/login'); die; } $this->view->stats = $stats; $state = State::FindByColumn('login', Auth::GetLogin()); //TODO: баг не работает logout если мы еще beginner !!! if ($state->state == 'beginner') { header('location: /beginner'); die; } }