Domain Strict - Forces users to be members of domains in order to view content.
So they are still logged in to the whole system, that's what other modules can see.
The best you can do is to create your own module, or use PHP module to create a block with PHP filter. Use code similar to the one from this Drupal.org post:
// Count users with activity in the past defined period. $interval = time() - 900; // Perform database queries to gather online user lists. We use s.timestamp // rather than u.access because it is much faster is much faster.. $anonymous_count = sess_count($interval); $authenticated_users = db_query('SELECT u.uid, u.name FROM {users} u INNER JOIN {sessions} s ON u.uid = s.uid WHERE s.timestamp >= %d AND s.uid > 0 ORDER BY s.timestamp DESC', $interval); $authenticated_count = db_num_rows($authenticated_users); // Format the output with proper grammar. if ($anonymous_count == 1 && $authenticated_count == 1) { $output = t('There is currently %members and %visitors online.', array('%members' => format_plural($authenticated_count, '1 user', '@count users'), '%visitors' => format_plural($anonymous_count, '1 guest', '@count guests'))); } else { $output = t('There are currently %members and %visitors online.', array('%members' => format_plural($authenticated_count, '1 user', '@count users'), '%visitors' => format_plural($anonymous_count, '1 guest', '@count guests'))); } echo $output;
Now you have 2 modifications to make:
- Get rid of the whole "anonymous" part, as you don't need it.
- Modify the
$authenticated_users = db_query part to JOIN the table Domain Strict module uses, and only count users that have access to the current domain.