3 require_once 'Pman.php';
5 class Pman_MTrack_UserRepos extends Pman {
15 $au = DB_DataObject::Factory('Person');
16 $au->company_id = $au->sqlValue("(SELECT id from Companies where comptype='OWNER' LIMIT 1)");
17 if (!$au->get('email', $_REQUEST['email']) ) {
18 $this->err("invalid email");
20 $pd = DB_DataObject::Factory('ProjectDirectory');
21 $pd->whereAdd("role LIKE '%DEVELOPER%'");
22 $pd->person_id = $au->id;
24 $pd->selectAdd('distinct(project_id) AS project_id');
25 $pids = $pd->fetchAll('project_id');
27 $repo = DB_DataObject::Factory('mtrack_repos');
28 $repo->whereAddIn('project_id', $pids, 'int');
29 $repos = $repo->fetchAll('shortname');