Example #1
0
 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 getId()
 {
     if ($this->__isInitialized__ === false) {
         return (int) parent::getId();
     }
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array());
     return parent::getId();
 }