Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function taskFormSubmitted(Form $form)
- {
- $hash = $this->calculateHash($form->values->password) ;
- try {
- $this->registrations->registrationUser($form->values->username, $hash, $form->values->name);
- $this->flashMessage('byl jste registrovan', 'success');
- } catch (Exception $e) {
- if ($e->getCode() == 23000) {
- $this->flashMessage('tenhle nick uz je pouzivan.', 'success');
- } else {
- $this->flashMessage('registrace se nepovedla, zkuste to prosím za chviličku znovu', 'success');
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment