- $total_users = count($users);
- $active_users_halfyear = 0;
- $active_users_monthly = 0;
-
- $halfyear = time() - (180 * 24 * 60 * 60);
- $month = time() - (30 * 24 * 60 * 60);
-
- foreach ($users AS $user) {
- if ((strtotime($user['login_date']) > $halfyear) ||
- (strtotime($user['last-item']) > $halfyear)) {
- ++$active_users_halfyear;
- }
- if ((strtotime($user['login_date']) > $month) ||
- (strtotime($user['last-item']) > $month)) {
- ++$active_users_monthly;
- }
- }
- Config::set('nodeinfo', 'total_users', $total_users);
- logger('total_users: '.$total_users, LOGGER_DEBUG);
+ $total_users = count($users);
+ $active_users_halfyear = 0;
+ $active_users_monthly = 0;