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