diff --git a/src/Controller/UsersController.php b/src/Controller/UsersController.php index 4d1e6941..ccaa89a0 100644 --- a/src/Controller/UsersController.php +++ b/src/Controller/UsersController.php @@ -307,6 +307,7 @@ public function registerProfessor() if ($this->request->is('post')) { $user = $this->Users->patchEntity($user, $this->request->data); + $user->isProfessor = true; if ($user->errors()) { $this->Flash->error(__('Your informations are invalid. Please try again later or contact us if the problem persists')); @@ -400,6 +401,7 @@ public function registerStudent() $user->editPassword($this->request->data['password']); $user->editEmailPublic($this->request->data['email']); $user->editMailingList(true); + $user->isStudent = true; if ($this->Users->save($user)) { // Redirect to optional information page