| @@ 704-722 (lines=19) @@ | ||
| 701 | ||
| 702 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 703 | ||
| 704 | if (!$logged) { |
|
| 705 | $this->flashMessenger()->addMessage( |
|
| 706 | 'Authentication failed. Please try again.' |
|
| 707 | ); |
|
| 708 | ||
| 709 | return $this->redirect()->toUrl( |
|
| 710 | $this->frontendUrl()->fromRoute( |
|
| 711 | $this->game->getClassType() . '/login', |
|
| 712 | array('id' => $this->game->getIdentifier()) |
|
| 713 | ) |
|
| 714 | ); |
|
| 715 | } else { |
|
| 716 | return $this->redirect()->toUrl( |
|
| 717 | $this->frontendUrl()->fromRoute( |
|
| 718 | $this->game->getClassType() . '/index', |
|
| 719 | array('id' => $this->game->getIdentifier()) |
|
| 720 | ) |
|
| 721 | ); |
|
| 722 | } |
|
| 723 | } |
|
| 724 | ||
| 725 | $form->setAttribute( |
|
| @@ 940-957 (lines=18) @@ | ||
| 937 | ||
| 938 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 939 | ||
| 940 | if ($logged) { |
|
| 941 | return $this->redirect()->toUrl( |
|
| 942 | $this->frontendUrl()->fromRoute( |
|
| 943 | $this->game->getClassType(), |
|
| 944 | array('id' => $this->game->getIdentifier()) |
|
| 945 | ) |
|
| 946 | ); |
|
| 947 | } else { |
|
| 948 | $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage( |
|
| 949 | 'Authentication failed. Please try again.' |
|
| 950 | ); |
|
| 951 | return $this->redirect()->toUrl( |
|
| 952 | $this->frontendUrl()->fromRoute( |
|
| 953 | $this->game->getClassType() . '/login', |
|
| 954 | array('id' => $this->game->getIdentifier()) |
|
| 955 | ) |
|
| 956 | ); |
|
| 957 | } |
|
| 958 | } |
|
| 959 | ||
| 960 | $redirect = $this->frontendUrl()->fromRoute( |
|