Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -825,6 +825,10 @@ class User extends Model
|
||||
|
||||
//更新用户ip
|
||||
public function update_user_ip($user_id,$ip){
|
||||
//判断$ip是否是汉字
|
||||
if(preg_match('/[\x{4e00}-\x{9fa5}]+/u', $ip)){
|
||||
$ip = '未知';
|
||||
}
|
||||
$data = [
|
||||
'address_ip' => $ip
|
||||
];
|
||||
|
||||
@@ -33,7 +33,7 @@ class FriendEnd
|
||||
$friending_info = db::name('vs_user_friending')->where('room_id', $room['id'])->where('status', 1)->order('id', 'desc')->find();
|
||||
if($friending_info){
|
||||
//判断结束时间是否到期
|
||||
if($friending_info['end_time'] <= time()){
|
||||
if($friending_info['end_time'] <= time() || $room['step'] == 3){
|
||||
model('Friend')->end_friend(0,$room['id'],$friending_info['id'],1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user