| @@ 658-676 (lines=19) @@ | ||
| 655 | ||
| 656 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 657 | ||
| 658 | if (!$logged) { |
|
| 659 | $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage( |
|
| 660 | 'Authentication failed. Please try again.' |
|
| 661 | ); |
|
| 662 | ||
| 663 | return $this->redirect()->toUrl( |
|
| 664 | $this->frontendUrl()->fromRoute( |
|
| 665 | $this->game->getClassType() . '/login', |
|
| 666 | array('id' => $this->game->getIdentifier()) |
|
| 667 | ) |
|
| 668 | ); |
|
| 669 | } else { |
|
| 670 | return $this->redirect()->toUrl( |
|
| 671 | $this->frontendUrl()->fromRoute( |
|
| 672 | $this->game->getClassType() . '/' . $this->game->nextStep('index'), |
|
| 673 | array('id' => $this->game->getIdentifier()) |
|
| 674 | ) |
|
| 675 | ); |
|
| 676 | } |
|
| 677 | } |
|
| 678 | ||
| 679 | $form->setAttribute( |
|
| @@ 856-876 (lines=21) @@ | ||
| 853 | ||
| 854 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 855 | ||
| 856 | if ($logged) { |
|
| 857 | return $this->redirect()->toUrl( |
|
| 858 | $this->frontendUrl()->fromRoute( |
|
| 859 | $this->game->getClassType() . '/' . $this->game->nextStep('index'), |
|
| 860 | array('id' => $this->game->getIdentifier()) |
|
| 861 | ) |
|
| 862 | ); |
|
| 863 | } else { |
|
| 864 | $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage( |
|
| 865 | 'Authentication failed. Please try again.' |
|
| 866 | ); |
|
| 867 | return $this->redirect()->toUrl( |
|
| 868 | $this->frontendUrl()->fromRoute( |
|
| 869 | $this->game->getClassType() . '/login', |
|
| 870 | array('id' => $this->game->getIdentifier()) |
|
| 871 | ) |
|
| 872 | ); |
|
| 873 | } |
|
| 874 | } |
|
| 875 | ||
| 876 | $redirect = $this->frontendUrl()->fromRoute( |
|
| 877 | $this->game->getClassType().'/login', |
|
| 878 | array( |
|
| 879 | 'id' => $this->game->getIdentifier(), |
|