}
}
+ function isPendingMember($group)
+ {
+ $request = Group_join_queue::pkeyGet(array('profile_id' => $this->id,
+ 'group_id' => $group->id));
+ return !empty($request);
+ }
+
function getGroups($offset=0, $limit=null)
{
$qry =
return $ok;
}
+ /**
+ * Cancel a pending group join...
+ *
+ * @param User_group $group
+ */
+ function cancelJoinGroup(User_group $group)
+ {
+ $request = Group_join_queue::pkeyGet(array('profile_id' => $this->id,
+ 'group_id' => $group->id));
+ if ($request) {
+ if (Event::handle('StartCancelJoinGroup', array($group, $this))) {
+ $request->delete();
+ Event::handle('EndCancelJoinGroup', array($group, $this));
+ }
+ }
+ }
+
/**
* Leave a group that this profile is a member of.
*