summaryrefslogtreecommitdiff
path: root/classes/Group_block.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/Group_block.php')
-rw-r--r--classes/Group_block.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/classes/Group_block.php b/classes/Group_block.php
index d945fd57a..4c583d8e2 100644
--- a/classes/Group_block.php
+++ b/classes/Group_block.php
@@ -92,4 +92,24 @@ class Group_block extends Memcached_DataObject
return $block;
}
+
+ static function unblockProfile($group, $profile)
+ {
+ $block = Group_block::pkeyGet(array('group_id' => $group->id,
+ 'blocked' => $profile->id));
+
+ if (empty($block)) {
+ return null;
+ }
+
+ $result = $block->delete();
+
+ if (!$result) {
+ common_log_db_error($block, 'DELETE', __FILE__);
+ return null;
+ }
+
+ return true;
+ }
+
}