]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Group_member.php
Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
[quix0rs-gnu-social.git] / classes / Group_member.php
index 2cf31cf123c54b2cd784984c576b3b2e141a229b..5385e0f4874133d4ad2da47c798cac374204dce3 100644 (file)
@@ -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());
+    }
 }