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