/** * @param \Nette\Database\Table\ActiveRow * @return \Nette\Security\Identity */ public function createIdentity(ActiveRow $user) { $data = $user->toArray(); unset($data['password']); $role = strtolower($user->ref('users_groups', 'group_id')->g_title); return new Identity($user->id, $role, $data); }
/** * @return array */ public function toArray() { return $this->activeRow->toArray(); }
public function createIdentity(ActiveRow $user) { $data = $user->toArray(); unset($user['password']); return new \Nette\Security\Identity($user->id, NULL, $data); }