projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc8613f
)
DataObjects/Groups.php
author
Alan Knowles
<alan@akbkhome.com>
Thu, 12 Jan 2012 02:28:57 +0000
(10:28 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 12 Jan 2012 02:28:57 +0000
(10:28 +0800)
DataObjects/Groups.php
patch
|
blob
|
history
diff --git
a/DataObjects/Groups.php
b/DataObjects/Groups.php
index
3366754
..
88f63c5
100755
(executable)
--- a/
DataObjects/Groups.php
+++ b/
DataObjects/Groups.php
@@
-78,6
+78,16
@@
class Pman_Core_DataObjects_Groups extends DB_DataObject
}
+
+ function addMember($person) {
+ $gm = DB_Dataobject::factory('Group_Members');
+ $gm->group_id = $this->id;
+ $gm->user_id = $person->id;
+ if (!$gm->count()) {
+ $gm->insert();
+ }
+ }
+
function members()
{