public function __construct($data = NULL) { parent::__construct($data); $this->_id = isset($data->id) ? (int) $data->id : 0; // V2Item - Messy - clean this up. if (isset($data->role_code)) { $role = ORM::Factory('role')->where('code', '=', $data->role_code)->find(); if ($role->loaded()) { $this->_id = $role->id; } } $this->_role = $this->_load_role($this->_id); }
public function __construct($data = NULL) { parent::__construct($data); $this->_roles = ORM::Factory('role'); }
public function __construct($data = NULL) { parent::__construct($data); $this->_users = ORM::Factory('user'); }
public function __construct($data = NULL) { parent::__construct($data); $this->_id = isset($data->id) ? (int) $data->id : 0; $this->_user = $this->_load_user($this->_id); }