| @@ 688-706 (lines=19) @@ | ||
| 685 | ||
| 686 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 687 | ||
| 688 | if (!$logged) { |
|
| 689 | $this->flashMessenger()->addMessage( |
|
| 690 | 'Authentication failed. Please try again.' |
|
| 691 | ); |
|
| 692 | ||
| 693 | return $this->redirect()->toUrl( |
|
| 694 | $this->frontendUrl()->fromRoute( |
|
| 695 | $this->game->getClassType() . '/login', |
|
| 696 | array('id' => $this->game->getIdentifier()) |
|
| 697 | ) |
|
| 698 | ); |
|
| 699 | } else { |
|
| 700 | return $this->redirect()->toUrl( |
|
| 701 | $this->frontendUrl()->fromRoute( |
|
| 702 | $this->game->getClassType() . '/index', |
|
| 703 | array('id' => $this->game->getIdentifier()) |
|
| 704 | ) |
|
| 705 | ); |
|
| 706 | } |
|
| 707 | } |
|
| 708 | ||
| 709 | $form->setAttribute( |
|
| @@ 922-939 (lines=18) @@ | ||
| 919 | ||
| 920 | $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate')); |
|
| 921 | ||
| 922 | if ($logged) { |
|
| 923 | return $this->redirect()->toUrl( |
|
| 924 | $this->frontendUrl()->fromRoute( |
|
| 925 | $this->game->getClassType(), |
|
| 926 | array('id' => $this->game->getIdentifier()) |
|
| 927 | ) |
|
| 928 | ); |
|
| 929 | } else { |
|
| 930 | $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage( |
|
| 931 | 'Authentication failed. Please try again.' |
|
| 932 | ); |
|
| 933 | return $this->redirect()->toUrl( |
|
| 934 | $this->frontendUrl()->fromRoute( |
|
| 935 | $this->game->getClassType() . '/login', |
|
| 936 | array('id' => $this->game->getIdentifier()) |
|
| 937 | ) |
|
| 938 | ); |
|
| 939 | } |
|
| 940 | } |
|
| 941 | ||
| 942 | $redirect = $this->frontendUrl()->fromRoute( |
|