mirror of
https://github.com/v2board/v2board.git
synced 2025-09-19 12:43:05 +08:00
优化设备在线计数性能
This commit is contained in:
@ -158,11 +158,7 @@ class UserController extends Controller
|
||||
$countalive = 0;
|
||||
$ips_array = Cache::get('ALIVE_IP_USER_'. $request->user['id']);
|
||||
if ($ips_array) {
|
||||
foreach ($ips_array as $nodetypeid => $ip_array) {
|
||||
foreach ($ip_array['aliveips'] as $ip) {
|
||||
$countalive++;
|
||||
}
|
||||
}
|
||||
$countalive = $ips_array['alive_ip'];
|
||||
}
|
||||
$user['alive_ip'] = $countalive;
|
||||
|
||||
|
Reference in New Issue
Block a user