저자: David Grudl
상속: extends Nette\FreezableObject, implements Nette\Security\IIdentity
예제 #1
0
 /**
  * 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);
 }
예제 #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);
 }