| @@ 36-40 (lines=5) @@ | ||
| 33 | ||
| 34 | $user = $this->zfcUserAuthentication()->getIdentity(); |
|
| 35 | ||
| 36 | if (!$user && !$game->getAnonymousAllowed()) { |
|
| 37 | $redirect = urlencode( |
|
| 38 | $this->frontendUrl()->fromRoute( |
|
| 39 | $game->getClassType() . '/play', |
|
| 40 | array('id' => $game->getIdentifier(), 'channel' => $channel), |
|
| 41 | array('force_canonical' => true) |
|
| 42 | ) |
|
| 43 | ); |
|
| @@ 393-410 (lines=18) @@ | ||
| 390 | $user = $view->user; |
|
| 391 | ||
| 392 | // If the user can not be created/retrieved from Facebook info, redirect to login/register form |
|
| 393 | if (!$user) { |
|
| 394 | $redirectUrl = urlencode( |
|
| 395 | $this->frontendUrl()->fromRoute( |
|
| 396 | $game->getClassType() .'/play', |
|
| 397 | array( |
|
| 398 | 'id' => $game->getIdentifier(), |
|
| 399 | 'channel' => $channel |
|
| 400 | ), |
|
| 401 | array('force_canonical' => true) |
|
| 402 | ) |
|
| 403 | ); |
|
| 404 | $redirect = $this->redirect()->toUrl( |
|
| 405 | $this->frontendUrl()->fromRoute( |
|
| 406 | 'zfcuser/register', |
|
| 407 | array('channel' => $channel) |
|
| 408 | ) . '?redirect='.$redirectUrl |
|
| 409 | ); |
|
| 410 | } |
|
| 411 | } |
|
| 412 | ||
| 413 | if ($game->getFbFan()) { |
|
| @@ 819-822 (lines=4) @@ | ||
| 816 | ); |
|
| 817 | } |
|
| 818 | ||
| 819 | if (!$user && !$game->getAnonymousAllowed()) { |
|
| 820 | $redirect = urlencode( |
|
| 821 | $this->frontendUrl()->fromRoute( |
|
| 822 | 'postvote/result', |
|
| 823 | array( |
|
| 824 | 'id' => $game->getIdentifier(), |
|
| 825 | 'channel' => $channel |
|
| @@ 31-49 (lines=19) @@ | ||
| 28 | ||
| 29 | $user = $this->zfcUserAuthentication()->getIdentity(); |
|
| 30 | ||
| 31 | if (!$user && !$game->getAnonymousAllowed()) { |
|
| 32 | $redirect = urlencode( |
|
| 33 | $this->frontendUrl()->fromRoute( |
|
| 34 | $game->getClassType() . '/play', |
|
| 35 | array( |
|
| 36 | 'id' => $game->getIdentifier(), |
|
| 37 | 'channel' => $channel |
|
| 38 | ), |
|
| 39 | array('force_canonical' => true) |
|
| 40 | ) |
|
| 41 | ); |
|
| 42 | ||
| 43 | return $this->redirect()->toUrl( |
|
| 44 | $this->frontendUrl()->fromRoute( |
|
| 45 | 'zfcuser/register', |
|
| 46 | array('channel' => $channel) |
|
| 47 | ) . '?redirect='.$redirect |
|
| 48 | ); |
|
| 49 | } |
|
| 50 | ||
| 51 | if ($game->getOccurrenceType()=='datetime') { |
|
| 52 | if ($this->getRequest()->isPost()) { |
|
| @@ 202-205 (lines=4) @@ | ||
| 199 | $occurrence = current($occurrences); |
|
| 200 | } |
|
| 201 | ||
| 202 | if (!$user && !$game->getAnonymousAllowed()) { |
|
| 203 | $redirect = urlencode( |
|
| 204 | $this->frontendUrl()->fromRoute( |
|
| 205 | 'instantwin/result', |
|
| 206 | array('id' => $game->getIdentifier(), 'channel' => $channel) |
|
| 207 | ) |
|
| 208 | ); |
|
| @@ 30-48 (lines=19) @@ | ||
| 27 | } |
|
| 28 | ||
| 29 | $user = $this->zfcUserAuthentication()->getIdentity(); |
|
| 30 | if (!$user && !$game->getAnonymousAllowed()) { |
|
| 31 | $redirect = urlencode( |
|
| 32 | $this->frontendUrl()->fromRoute( |
|
| 33 | $game->getClassType() . '/play', |
|
| 34 | array('id' => $game->getIdentifier(), 'channel' => $channel), |
|
| 35 | array('force_canonical' => true) |
|
| 36 | ) |
|
| 37 | ); |
|
| 38 | ||
| 39 | return $this->redirect()->toUrl( |
|
| 40 | $this->frontendUrl()->fromRoute( |
|
| 41 | 'zfcuser/register', |
|
| 42 | array('channel' => $channel) |
|
| 43 | ) . '?redirect='.$redirect |
|
| 44 | ); |
|
| 45 | } |
|
| 46 | ||
| 47 | $entry = $sg->play($game, $user); |
|
| 48 | if (!$entry) { |
|
| 49 | // the user has already taken part of this game and the participation limit has been reached |
|
| 50 | $this->flashMessenger()->addMessage('Vous avez déjà participé'); |
|
| 51 | ||
| @@ 112-115 (lines=4) @@ | ||
| 109 | ); |
|
| 110 | } |
|
| 111 | ||
| 112 | if (!$user && !$game->getAnonymousAllowed()) { |
|
| 113 | $redirect = urlencode( |
|
| 114 | $this->frontendUrl()->fromRoute( |
|
| 115 | 'lottery/result', |
|
| 116 | array('id' => $game->getIdentifier(), 'channel' => $channel) |
|
| 117 | ) |
|
| 118 | ); |
|
| @@ 42-57 (lines=16) @@ | ||
| 39 | ||
| 40 | $user = $this->zfcUserAuthentication()->getIdentity(); |
|
| 41 | ||
| 42 | if (!$user && !$game->getAnonymousAllowed()) { |
|
| 43 | $redirect = urlencode( |
|
| 44 | $this->frontendUrl()->fromRoute( |
|
| 45 | $game->getClassType() . '/play', |
|
| 46 | array('id' => $game->getIdentifier(), 'channel' => $channel), |
|
| 47 | array('force_canonical' => true) |
|
| 48 | ) |
|
| 49 | ); |
|
| 50 | ||
| 51 | return $this->redirect()->toUrl( |
|
| 52 | $this->frontendUrl()->fromRoute( |
|
| 53 | 'zfcuser/register', |
|
| 54 | array('channel' => $channel) |
|
| 55 | ) . '?redirect='.$redirect |
|
| 56 | ); |
|
| 57 | } |
|
| 58 | ||
| 59 | $entry = $sg->play($game, $user); |
|
| 60 | ||
| @@ 420-423 (lines=4) @@ | ||
| 417 | ); |
|
| 418 | } |
|
| 419 | ||
| 420 | if (!$user && !$game->getAnonymousAllowed()) { |
|
| 421 | $redirect = urlencode( |
|
| 422 | $this->frontendUrl()->fromRoute( |
|
| 423 | 'postvote/result', |
|
| 424 | array( |
|
| 425 | 'id' => $game->getIdentifier(), |
|
| 426 | 'channel' => $channel |
|
| @@ 822-825 (lines=4) @@ | ||
| 819 | // With core shortener helper |
|
| 820 | $socialLinkUrl = $this->shortenUrl()->shortenUrl($socialLinkUrl); |
|
| 821 | ||
| 822 | if (!$user && !$game->getAnonymousAllowed()) { |
|
| 823 | $redirect = urlencode( |
|
| 824 | $this->frontendUrl()->fromRoute( |
|
| 825 | 'postvote/result', |
|
| 826 | array('id' => $game->getIdentifier(), 'channel' => $channel) |
|
| 827 | ) |
|
| 828 | ); |
|