Commit 56bd88d1 authored by dj3c1t's avatar dj3c1t

refreshUser in SourceManager

parent f56ea0b4
......@@ -25,6 +25,11 @@ class SourceManager {
$this->container = $container;
$em = $this->container->get('doctrine')->getManager();
$this->sourceRepo = $em->getRepository("Dj3c1tSourceMLBundle:Source");
$this->refreshUser();
}
public function refreshUser() {
$this->user = null;
if($token = $this->container->get('security.token_storage')->getToken()) {
$this->user = $token->getUser();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment