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