Skip to content
Snippets Groups Projects
Commit bedd46e3 authored by Peter Rotich's avatar Peter Rotich
Browse files

Add user lookup for ticket.

parent cade4520
No related branches found
No related tags found
No related merge requests found
......@@ -108,6 +108,25 @@ class Collaborator {
return false;
}
static function forTicket($tid, $criteria=array()) {
$collaborators = array();
$sql='SELECT id FROM '.TICKET_COLLABORATOR_TABLE
.' WHERE ticket_id='.db_input($tid);
if(isset($criteria['isactive']))
$sql.=' AND isactive='.db_input($criteria['isactive']);
//TODO: sort by name of the user
if(($res=db_query($sql)) && db_num_rows($res))
while(list($id)=db_fetch_row($res))
$collaborators[] = self::lookup($id);
return $collaborators;
}
static function getIdByInfo($info) {
$sql='SELECT id FROM '.TICKET_COLLABORATOR_TABLE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment