/** * 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); }
/** * @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); }