public function userFormSubmitted(UserForm $form) { $values = $form->getValues(); $values->password = sha1($values->password); $this->usersModel->insertUser($values); $this->flashMessage('Užívateľ bol úspešne vložený!', 'success'); $this->redirect(':Admin:User:default'); }
/** * @param RegistrationForm */ public function registrationFormSubmitted(RegistrationForm $form) { $values = $form->getValues(); $values->password = sha1($values->password); $values->role_id = 3; $this->usersModel->insertUser($values); $this->flashMessage('Registrácia bola úspešná!', 'success'); $this->redirect(':Front:Auth:login'); }