| @@ 854-872 (lines=19) @@ | ||
| 851 | ||
| 852 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 853 | ||
| 854 | if (!$logged) { |
|
| 855 | $this->flashMessenger()->addMessage( |
|
| 856 | 'Authentication failed. Please try again.' |
|
| 857 | ); |
|
| 858 | ||
| 859 | return $this->redirect()->toUrl( |
|
| 860 | $this->frontendUrl()->fromRoute( |
|
| 861 | $this->game->getClassType().'/login', |
|
| 862 | array('id' => $this->game->getIdentifier()) |
|
| 863 | ) |
|
| 864 | ); |
|
| 865 | } else { |
|
| 866 | return $this->redirect()->toUrl( |
|
| 867 | $this->frontendUrl()->fromRoute( |
|
| 868 | $this->game->getClassType().'/'.$this->game->nextStep('index'), |
|
| 869 | array('id' => $this->game->getIdentifier()) |
|
| 870 | ) |
|
| 871 | ); |
|
| 872 | } |
|
| 873 | } |
|
| 874 | ||
| 875 | $form->setAttribute( |
|
| @@ 1134-1151 (lines=18) @@ | ||
| 1131 | ||
| 1132 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 1133 | ||
| 1134 | if ($logged) { |
|
| 1135 | return $this->redirect()->toUrl( |
|
| 1136 | $this->frontendUrl()->fromRoute( |
|
| 1137 | $this->game->getClassType().'/'.$this->game->nextStep('index'), |
|
| 1138 | array('id' => $this->game->getIdentifier()) |
|
| 1139 | ) |
|
| 1140 | ); |
|
| 1141 | } else { |
|
| 1142 | $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage( |
|
| 1143 | 'Authentication failed. Please try again.' |
|
| 1144 | ); |
|
| 1145 | return $this->redirect()->toUrl( |
|
| 1146 | $this->frontendUrl()->fromRoute( |
|
| 1147 | $this->game->getClassType().'/login', |
|
| 1148 | array('id' => $this->game->getIdentifier()) |
|
| 1149 | ) |
|
| 1150 | ); |
|
| 1151 | } |
|
| 1152 | } |
|
| 1153 | ||
| 1154 | $redirect = $this->frontendUrl()->fromRoute( |
|