WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When user registers to my site I want to make them inactive by default so I can manually update their status and send them their login info. I am using wordpress 3.1.2. Is it possible? Are there any plugins for this?

BTW, I am using Cimy User Extra Field plugin to add more fields to the registration page.

share|improve this question
up vote 2 down vote accepted
Plugin Name: Role-less New Users
Description: Removes all roles from new registrations.
Author: 5ubliminal
// Hook into the registration process
add_action('user_register', function($user_id){
    $user = new WP_User($user_id);
    // Remove all user roles after registration
    foreach($user->roles as $role){
}, 11);

Create a new .php file. Paste the code above in it. Put it in your /wp-content/plugins folder and activate it. Do test it!

PS: Be advised, PHP 5.3 syntax, closures used. Incompatible with PHP 5.2 or older.

share|improve this answer
Thanks for the code – wannabeprogrammer Oct 12 '11 at 11:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.