| @@ 706-724 (lines=19) @@ | ||
| 703 | ||
| 704 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 705 | ||
| 706 | if (!$logged) { |
|
| 707 | $this->flashMessenger()->addMessage( |
|
| 708 | 'Authentication failed. Please try again.' |
|
| 709 | ); |
|
| 710 | ||
| 711 | return $this->redirect()->toUrl( |
|
| 712 | $this->frontendUrl()->fromRoute( |
|
| 713 | $this->game->getClassType() . '/login', |
|
| 714 | array('id' => $this->game->getIdentifier()) |
|
| 715 | ) |
|
| 716 | ); |
|
| 717 | } else { |
|
| 718 | return $this->redirect()->toUrl( |
|
| 719 | $this->frontendUrl()->fromRoute( |
|
| 720 | $this->game->getClassType() . '/index', |
|
| 721 | array('id' => $this->game->getIdentifier()) |
|
| 722 | ) |
|
| 723 | ); |
|
| 724 | } |
|
| 725 | } |
|
| 726 | ||
| 727 | $form->setAttribute( |
|
| @@ 961-978 (lines=18) @@ | ||
| 958 | ||
| 959 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 960 | ||
| 961 | if ($logged) { |
|
| 962 | return $this->redirect()->toUrl( |
|
| 963 | $this->frontendUrl()->fromRoute( |
|
| 964 | $this->game->getClassType(), |
|
| 965 | array('id' => $this->game->getIdentifier()) |
|
| 966 | ) |
|
| 967 | ); |
|
| 968 | } else { |
|
| 969 | $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage( |
|
| 970 | 'Authentication failed. Please try again.' |
|
| 971 | ); |
|
| 972 | return $this->redirect()->toUrl( |
|
| 973 | $this->frontendUrl()->fromRoute( |
|
| 974 | $this->game->getClassType() . '/login', |
|
| 975 | array('id' => $this->game->getIdentifier()) |
|
| 976 | ) |
|
| 977 | ); |
|
| 978 | } |
|
| 979 | } |
|
| 980 | ||
| 981 | $redirect = $this->frontendUrl()->fromRoute( |
|