Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
mah0001 committed May 14, 2024
1 parent 985e0a7 commit afca919
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion application/models/Editor_owners_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ function select_all($sid)

function list_users()
{
$this->db->select('id,username,email');
$this->db->select('users.id,username,email,meta.first_name,meta.last_name');
$this->db->join('meta','users.id=meta.user_id');
$this->db->order_by('username','ASC');
return $this->db->get('users')->result_array();
}
Expand Down Expand Up @@ -148,4 +149,19 @@ function is_project_shared($sid)
return $this->db->count_all_results('editor_project_owners');
}


function search_users($keywords)
{
$this->db->select('users.id,username,email,meta.first_name,meta.last_name');
$this->db->join('meta','users.id=meta.user_id');

$this->db->where("username like '".$keywords."%'");
$this->db->or_where("email like '".$keywords."%'");
$this->db->or_where("meta.first_name like '".$keywords."%'");
$this->db->or_where("meta.last_name like '".$keywords."%'");

$this->db->order_by('username','ASC');
return $this->db->get('users')->result_array();
}

}

0 comments on commit afca919

Please sign in to comment.