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