Skip to content

Problem: dean helper must be a teacher

Controller/Index.php:


    public function action_index() {
        $user = User::instance();

        // todo: problem: dean helper must be a teacher
        $request = ($user->isSignedIn()) ? $user->Type . '/index' : 'sign';
        $page = Request::factory($request)->execute();
        $this->response->body($page);
    }

если сотрудник деканата авторизовался в локальный аккаунт, но у него нет записи преподавателя, то получается ошибка:

image

стоит хотя бы выдавать понятное сообщение об ошибке

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information