From 342d4c3246d5d9c650791c63e075a1bfd242e398 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Sun, 11 Dec 2011 16:33:38 +0800 Subject: [PATCH] DataObjects/ProjectDirectory.php --- DataObjects/ProjectDirectory.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/DataObjects/ProjectDirectory.php b/DataObjects/ProjectDirectory.php index 5f376700..f401b2cb 100644 --- a/DataObjects/ProjectDirectory.php +++ b/DataObjects/ProjectDirectory.php @@ -63,6 +63,21 @@ class Pman_Core_DataObjects_ProjectDirectory extends DB_DataObject } /** * project id's for a user. + * @param DB_DataObject_Core_Person|array - who, or list of people. + * @return array id's of the project they are a member of.. + */ + function projects($au) + { + $c = clone ($this); + if (is_array($au)) { + $c->whereAddIn('id', $au, 'int'); + } else { + $c->person_id = $au->id; + } + return $this->fetchAll('project_id'); + } + /** + * project id's for a user. * @param DB_DataObject_Core_Person - who * @return array id's of the project they are a member of.. */ -- 2.39.2