Exemplo n.º 1
0
 /**
  * 检查用户和ip是否被禁言
  * @param $userId
  * @param $ip
  * @throws CommentApiException
  */
 protected function isBan($userId, $ip)
 {
     if (Blacklist::check_user($userId)) {
         throw new CommentApiException($userId . "被禁言~!");
     }
     if (Blacklist::check_ip($ip)) {
         throw new CommentApiException($ip . "被禁言~!");
     }
 }
Exemplo n.º 2
0
 protected function _check_blacklist($user_id, $ip)
 {
     if (Blacklist::check_user($user_id)) {
         $return_arr['status'] = -19;
         return $return_arr;
     }
     if (Blacklist::check_ip($ip)) {
         $return_arr['status'] = -20;
         return $return_arr;
     }
     return false;
 }