]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Group_member.php
move core schema to class files
[quix0rs-gnu-social.git] / classes / Group_member.php
index 2cf31cf123c54b2cd784984c576b3b2e141a229b..cc7e4a353ee955804e8d1746fa4d1b2fea25145d 100644 (file)
@@ -3,7 +3,7 @@
  * Table Definition for group_member
  */
 
-class Group_member extends Memcached_DataObject
+class Group_member extends Managed_DataObject
 {
     ###START_AUTOCODE
     /* the code below is auto generated do not remove the above tag */
@@ -28,6 +28,7 @@ class Group_member extends Memcached_DataObject
 
     /**
      * Method to add a user to a group.
+     * In most cases, you should call Profile->joinGroup() instead.
      *
      * @param integer $group_id   Group to add to
      * @param integer $profile_id Profile being added
@@ -161,4 +162,13 @@ class Group_member extends Memcached_DataObject
 
         return $act;
     }
+
+    /**
+     * Send notifications via email etc to group administrators about
+     * this exciting new membership!
+     */
+    public function notify()
+    {
+        mail_notify_group_join($this->getGroup(), $this->getMember());
+    }
 }