| @@ 785-803 (lines=19) @@ | ||
| 782 | ||
| 783 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 784 | ||
| 785 | if (!$logged) { |
|
| 786 | $this->flashMessenger()->addMessage( |
|
| 787 | 'Authentication failed. Please try again.' |
|
| 788 | ); |
|
| 789 | ||
| 790 | return $this->redirect()->toUrl( |
|
| 791 | $this->frontendUrl()->fromRoute( |
|
| 792 | $this->game->getClassType().'/login', |
|
| 793 | array('id' => $this->game->getIdentifier()) |
|
| 794 | ) |
|
| 795 | ); |
|
| 796 | } else { |
|
| 797 | return $this->redirect()->toUrl( |
|
| 798 | $this->frontendUrl()->fromRoute( |
|
| 799 | $this->game->getClassType().'/'.$this->game->nextStep('index'), |
|
| 800 | array('id' => $this->game->getIdentifier()) |
|
| 801 | ) |
|
| 802 | ); |
|
| 803 | } |
|
| 804 | } |
|
| 805 | ||
| 806 | $form->setAttribute( |
|
| @@ 1040-1057 (lines=18) @@ | ||
| 1037 | ||
| 1038 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 1039 | ||
| 1040 | if ($logged) { |
|
| 1041 | return $this->redirect()->toUrl( |
|
| 1042 | $this->frontendUrl()->fromRoute( |
|
| 1043 | $this->game->getClassType().'/'.$this->game->nextStep('index'), |
|
| 1044 | array('id' => $this->game->getIdentifier()) |
|
| 1045 | ) |
|
| 1046 | ); |
|
| 1047 | } else { |
|
| 1048 | $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage( |
|
| 1049 | 'Authentication failed. Please try again.' |
|
| 1050 | ); |
|
| 1051 | return $this->redirect()->toUrl( |
|
| 1052 | $this->frontendUrl()->fromRoute( |
|
| 1053 | $this->game->getClassType().'/login', |
|
| 1054 | array('id' => $this->game->getIdentifier()) |
|
| 1055 | ) |
|
| 1056 | ); |
|
| 1057 | } |
|
| 1058 | } |
|
| 1059 | ||
| 1060 | $redirect = $this->frontendUrl()->fromRoute( |
|