| @@ 777-795 (lines=19) @@ | ||
| 774 | ||
| 775 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 776 | ||
| 777 | if (!$logged) { |
|
| 778 | $this->flashMessenger()->addMessage( |
|
| 779 | 'Authentication failed. Please try again.' |
|
| 780 | ); |
|
| 781 | ||
| 782 | return $this->redirect()->toUrl( |
|
| 783 | $this->frontendUrl()->fromRoute( |
|
| 784 | $this->game->getClassType().'/login', |
|
| 785 | array('id' => $this->game->getIdentifier()) |
|
| 786 | ) |
|
| 787 | ); |
|
| 788 | } else { |
|
| 789 | return $this->redirect()->toUrl( |
|
| 790 | $this->frontendUrl()->fromRoute( |
|
| 791 | $this->game->getClassType().'/index', |
|
| 792 | array('id' => $this->game->getIdentifier()) |
|
| 793 | ) |
|
| 794 | ); |
|
| 795 | } |
|
| 796 | } |
|
| 797 | ||
| 798 | $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(), |
|
| 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( |
|