function hasBlocked($other) { $block = Profile_block::exists($this, $other); return !empty($block); }
function unblock(Profile $other) { // Get the block record $block = Profile_block::exists($this->getProfile(), $other); if (!$block) { return false; } $result = $block->delete(); if (!$result) { common_log_db_error($block, 'DELETE', __FILE__); return false; } return true; }