public function find_author_img($id = 0) { if ((int) $id == 0) { return false; } $name = parent::find($id); return gravatar_link($name->email); }
/** * Returns Name of Author of article. * * @param int $id User ID of Author * * @return mixed False if no ID is provided, else String of Display Name of User. */ public function find_author($id = 0) { if ((int) $id == 0) { return false; } $this->select($this->display_name); $name = parent::find($id); return $name->{$this->display_name}; }
public function can_delete_role($role_id = 0) { $this->db->select('role_id, can_delete'); $delete_role = parent::find($role_id); if ($delete_role->can_delete == 1) { return TRUE; } return FALSE; }
/** * Find a user's record and role information. * * @param integer $id The user's ID. * * @return boolean|object An object with the user's information. */ public function find($id = null) { return parent::find($id); }
public function find($id = null) { $this->db->join('roles', 'roles.role_id = users.role_id', 'left'); return parent::find($id); }
public function find($id = null) { if (empty($this->selects)) { $this->select($this->table . '.*, role_name'); } $this->db->join('roles', 'roles.role_id = users.role_id', 'left'); return parent::find($id); }
/** * Find a user's record and role information. * * @param integer $id The user's ID. * * @return boolean|object An object with the user's information. */ public function find($id = null) { $this->preFind(); return parent::find($id); }
/** * Verifies that a role can be deleted. * * @param int $role_id The role to verify. * * @return bool true if the role can be deleted, else false */ public function can_delete_role($role_id = 0) { $this->db->select('can_delete'); $delete_role = parent::find($role_id); if ($delete_role->can_delete == 1) { return true; } return false; }
public function find($id = null) { if (empty($this->selects)) { $this->select($this->table . '.*, category'); } $this->db->join('news_categories', 'news_categories.id = news_articles.category_id', 'left'); return parent::find($id); }
/** * Verifies that a role can be deleted. * * @param integer $role_id The role to verify. * * @return boolean True if the role can be deleted, else false. */ public function can_delete_role($role_id = 0) { $this->db->select('can_delete'); $delete_role = parent::find($role_id); return $delete_role->can_delete == 1; }