Author: David Grudl
Inheritance: extends Nette\FreezableObject, implements Nette\Security\IIdentity
 /**
  * Data returned from oauth server
  *
  * @param array $info
  */
 public function __construct($info)
 {
     $this->data = array_merge($info['info'], $info['raw']);
     parent::__construct($info['uid'], null, $this->data);
 }
Beispiel #2
0
 /**
  * @param \Flame\CMS\UserBundle\Model\User $user
  */
 public function __construct(\Flame\CMS\UserBundle\Model\User $user)
 {
     $data = $user->toArray();
     unset($data['password']);
     parent::__construct($user->getId(), $user->getRole(), $data);
 }