Hi everybody.
I need the list of IDs of the users logged into my web.
With this code I get the total list of registered users, but I need only logged users.
Can someone help me with that?
Sorry for bad english, I'm Spanish user.
$query = $modx->newQuery('modUser');
$query->leftJoin('modUserProfile','Profile');
$query->where(array('id:>' => 2, "Profile.blocked:=" => 0, "active:=" => 1));
$users = $modx->getCollection('modUser', $query);
foreach($users as $user){
$modUser = $user->toArray();
$profile = $user->getOne('Profile');
$modUserProfile = $profile->toArray();
$output.= $modUser['id'].'<br>';
}
return $output;