| @@ 642-662 (lines=21) @@ | ||
| 639 | ||
| 640 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 641 | ||
| 642 | if ($logged) { |
|
| 643 | return $this->redirect()->toUrl( |
|
| 644 | $this->frontendUrl()->fromRoute( |
|
| 645 | $this->game->getClassType() . '/' . $this->game->nextStep('index'), |
|
| 646 | array( |
|
| 647 | 'id' => $this->game->getIdentifier(), |
|
| 648 | ||
| 649 | ) |
|
| 650 | ) |
|
| 651 | ); |
|
| 652 | } else { |
|
| 653 | $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage( |
|
| 654 | 'Authentication failed. Please try again.' |
|
| 655 | ); |
|
| 656 | return $this->redirect()->toUrl( |
|
| 657 | $this->frontendUrl()->fromRoute( |
|
| 658 | $this->game->getClassType() . '/login', |
|
| 659 | array('id' => $this->game->getIdentifier()) |
|
| 660 | ) |
|
| 661 | ); |
|
| 662 | } |
|
| 663 | } |
|
| 664 | ||
| 665 | $form->setAttribute( |
|
| @@ 842-865 (lines=24) @@ | ||
| 839 | ||
| 840 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 841 | ||
| 842 | if ($logged) { |
|
| 843 | return $this->redirect()->toUrl( |
|
| 844 | $this->frontendUrl()->fromRoute( |
|
| 845 | $this->game->getClassType() . '/' . $this->game->nextStep('index'), |
|
| 846 | array( |
|
| 847 | 'id' => $this->game->getIdentifier(), |
|
| 848 | ||
| 849 | ) |
|
| 850 | ) |
|
| 851 | ); |
|
| 852 | } else { |
|
| 853 | $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage( |
|
| 854 | 'Authentication failed. Please try again.' |
|
| 855 | ); |
|
| 856 | return $this->redirect()->toUrl( |
|
| 857 | $this->frontendUrl()->fromRoute( |
|
| 858 | $this->game->getClassType() . '/login', |
|
| 859 | array( |
|
| 860 | 'id' => $this->game->getIdentifier(), |
|
| 861 | ||
| 862 | ) |
|
| 863 | ) |
|
| 864 | ); |
|
| 865 | } |
|
| 866 | } |
|
| 867 | ||
| 868 | $redirect = $this->frontendUrl()->fromRoute( |
|