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