示例#1
0
 function hasBlocked($other)
 {
     $block = Profile_block::exists($this, $other);
     return !empty($block);
 }
示例#2
0
 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;
 }