@gidgreen + pros: Alright, I want to make sure that there is no better way (performance).
For my new plugin I need to ignore blocked users, this is what I did:
// get blocked users that we don't want in our listing
$blockedusers = array();
$blockedusersData =qa_db_select_with_pending(qa_db_users_with_flag_selectspec(QA_USER_FLAGS_USER_BLOCKED));
foreach ($blockedusersData as $user) {
array_push($blockedusers,$user['userid']);
}
Then I list all users:
foreach ($scores as $userId => $val) {
// no users with 0 points, and no blocked users!
if($val>0 && !in_array($userId, $blockedusers) ) {
$currentUser = $usernames[$userId];
$user = qa_db_select_with_pending( qa_db_user_account_selectspec($currentUser, false) );
...
As you see I implemented qa_db_users_with_flag_selectspec(QA_USER_FLAGS_USER_BLOCKED) at first, then I query the database again with qa_db_user_account_selectspec($currentUser, false).
Is that fine? Or could I somehow get blocked users using only qa_db_user_account_selectspec($currentUser, false) ?