Skip to content

Commit

Permalink
[TwigBundle] removed the cache for globals (does not work when workin…
Browse files Browse the repository at this point in the history
…g in functional tests)
  • Loading branch information
fabpot committed Jan 12, 2011
1 parent b056a6c commit 46f3da5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Bundle/TwigBundle/GlobalVariables.php
Expand Up @@ -30,15 +30,15 @@ public function __construct(ContainerInterface $container)
public function getSecurity()
{
if ($this->container->has('security.context')) {
return $this->security = $this->container->get('security.context');
return $this->container->get('security.context');
}
}

public function getUser()
{
$security = $this->getSecurity();
if ($security && $user = $security->getUser()) {
return $this->user = $user;
return $user;
}
}

Expand Down

0 comments on commit 46f3da5

Please sign in to comment.