Support » Plugins and Hacks » [Resolved] New User Approve Plugin crashes with WordPress 3.1

[Resolved] New User Approve Plugin crashes with WordPress 3.1

  • Plugin was working just fine , then I updated my wordpress to 3.1 and plugin crashes:

    Fatal error: Class ‘WP_User_Search’ not found in /#removed#/wp-content
    /plugins/new-user-approve/new-user-approve.php on line 488

    line 488 in the plugin is as follows:

    class PW_User_Search extends WP_User_Search {
       var $users_per_page = 999999999;

    Hope this helps you fix it!

Viewing 15 replies - 1 through 15 (of 16 total)
  • Same here, plugin was working fine…Plugin was working until I updated wordpress to 3.1.

    Line 488 in the plugin is the same:

    class PW_User_Search extends WP_User_Search {
    var $users_per_page = 999999999;

    not working here also

    Before the update is out there… open new-user-approve.php, line 486, and change

    The class they use has deprecated and was moved.
    …And wait for the update.

    thanks, vcherep! works just fine for me. great to have the plugin back online. 🙂

    please update that line with the next release!

    Glad to hear it helped!

    As for the next release, I believe it is not a good idea to just change that one line. The guys at WP changed the class: now it is called WP_User_Query, it is located in a different file, and it is not compatible with the old one (WP_User_Search). For example, the constructor does not take two or three parameters any more, instead it has one argument that may contain several parameters. So, I think it is better to switch to the new class and adjust the code — still just a minor work.

    My fix is just a quick one, which may immediately help the majority of users of this plug-in.

    Plugin Author Josh Harrison


    I am sorry about this everybody. I have fixed it and it is ready to be downloaded from the plugin repository. Version 1.2.6 is the latest.

    I did the quick fix. A better solution will be made available in the near future.

    Hey, man. Thanks for the quick fix. However, I found that your fix is exactly what I did — include ‘deprecated.php’ instead of ‘user.php’, which cannot really be considered as a permanent fix. They have WP_User_Query now with the same functionality as old class WP_User_Search, but a slightly different interface.

    Plugin Author Josh Harrison


    Yes. this was a quick fix and by no means permanent. And thank you for the suggestion to fix it. I wanted to get a quick fix to not break any sites. I have lots of other things going on so I didn’t have the time to make it permanent. The good news is that changes can be made later on and most people will not know the difference.

    I’m sorry if you are dissappointed.

    No, I am not disappointed at all, and I completely agree with this quick fix. As long as it works — nobody cares what they call “deprecated”. I just want to be sure that when ‘deprecated’ becomes ‘eliminated’ the plug-in will still work.

    And, BTW thanks for the plug-in. I have a lo-o-ong list of rejected spammers!

    I agree with vcherep: no disappointment here. But thankfulness the plugin is there at all and working — for the time being.

    I just updated to WP 3.1 by clicking the link at top of the dashboard… all of a sudden, I cannot get into the dashboard at all. How am I to edit the plugin? I have Dreamweaver CS4 and backed up my WP database before updating…. please advise. THANKS!

    I have been working on this all night. Trying to post for Monday AM so any help asap is appreciated!



    Forum Moderator

    FTP into your site (or use whatever file management application your host provides) and delete the wp-content/plugins/new-user-approve folder.

    THANKS. It worked.

    I’m having the same problem but neither editing line 486 nor deleted the folder are doing the trick. I’m still getting the “Fatal error: Class ‘WP_User_Search’ not found in …wp-content/plugins/new-user-approve/new-user-approve.php on line 488.”

    And now I’m locked out of my site! Help!

    Plugin Author Josh Harrison


    Delete the folder first and then get your site back to normal. Then reinstall the plugin with the latest version and you should have a working site.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Resolved] New User Approve Plugin crashes with WordPress 3.1’ is closed to new replies.