| @@ 743-761 (lines=19) @@ | ||
| 740 | ||
| 741 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 742 | ||
| 743 | if (!$logged) { |
|
| 744 | $this->flashMessenger()->addMessage( |
|
| 745 | 'Authentication failed. Please try again.' |
|
| 746 | ); |
|
| 747 | ||
| 748 | return $this->redirect()->toUrl( |
|
| 749 | $this->frontendUrl()->fromRoute( |
|
| 750 | $this->game->getClassType() . '/login', |
|
| 751 | array('id' => $this->game->getIdentifier()) |
|
| 752 | ) |
|
| 753 | ); |
|
| 754 | } else { |
|
| 755 | return $this->redirect()->toUrl( |
|
| 756 | $this->frontendUrl()->fromRoute( |
|
| 757 | $this->game->getClassType() . '/index', |
|
| 758 | array('id' => $this->game->getIdentifier()) |
|
| 759 | ) |
|
| 760 | ); |
|
| 761 | } |
|
| 762 | } |
|
| 763 | ||
| 764 | $form->setAttribute( |
|
| @@ 998-1015 (lines=18) @@ | ||
| 995 | ||
| 996 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 997 | ||
| 998 | if ($logged) { |
|
| 999 | return $this->redirect()->toUrl( |
|
| 1000 | $this->frontendUrl()->fromRoute( |
|
| 1001 | $this->game->getClassType(), |
|
| 1002 | array('id' => $this->game->getIdentifier()) |
|
| 1003 | ) |
|
| 1004 | ); |
|
| 1005 | } else { |
|
| 1006 | $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage( |
|
| 1007 | 'Authentication failed. Please try again.' |
|
| 1008 | ); |
|
| 1009 | return $this->redirect()->toUrl( |
|
| 1010 | $this->frontendUrl()->fromRoute( |
|
| 1011 | $this->game->getClassType() . '/login', |
|
| 1012 | array('id' => $this->game->getIdentifier()) |
|
| 1013 | ) |
|
| 1014 | ); |
|
| 1015 | } |
|
| 1016 | } |
|
| 1017 | ||
| 1018 | $redirect = $this->frontendUrl()->fromRoute( |
|