public function refreshAccount(Session $session) { if (!$this->app['repo.sessions']->find($session->getId())) { throw new RuntimeException('Unable to refresh the session, it does not exist anymore'); } if (null === ($user = $session->getUser())) { throw new RuntimeException('Unable to refresh the session'); } $this->session->clear(); $this->populateSession($session); foreach ($this->app['acl']->get($user)->get_granted_sbas() as $databox) { \cache_databox::insertClient($this->app, $databox); } $this->reinitUser(); return $session; }
/** * {@inheritDoc} */ public function getUser() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUser', array()); return parent::getUser(); }