• Hi, I did a search, but couldn’t find any solution.

    I don’t want automatic activation upon user registration. I want to have them in a queue waiting for my approval, so that way I can limit the traffic. (My site is a semi-private site, fyi) Just like comments moderation. Is that at all possible?

    THX!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator James Huff

    (@macmanx)

    What WordPress version are you using? Due to the number of support requests here and otherwise business of the week, I haven’t had a chance to upgrade to WordPress v2.0 and investigate it’s new “User Roles” system. But, if you are using WordPress v1.5.x, follow these instructions:

    In Options/General, select “Anyone can register”. And, in Options/Writing, select “Newly registered members > Cannot write articles”. The newly registered users will be registered with a User Level of 0. IOW, they won’t be able to do anything. From there, you can choose how far to promote them. This is as far as you can get when it comes to moderating user registration with WordPress.

    Now, if you really want to moderate registrations, then de-activate the “Anyone can register” option, ask the users to contact you via email to request registration, and register them yourself. This “trick” will work for both WordPress v1.5.x and v2.0.

    This would work fine for a low volume site, but if you requier registration to access the site content and have hundreds or thousands of members, it is not an option.

    Ideally it would be great to just have a check box in the admin section that simply states “Registrations require admin approval”. Then when a new user registers, they are flagged as something like -1, an email is sent to the admin, they can then click a link to approve and once this happens that user is sent an email with their username and password.

    I think this is what most people are requestign when they mention registration approval. However, it looks like this may be too complex to add in as a plugin.

    I found a solution that worked for me. Instead of having the email with the username and password be sent to the registrant, I tweaked it so that it comes to me. If I want to approve the user I then just forward the email on to the user. Here is a summary of what I changed:

    In wp-includes/pluggable-functions.php

    I changed this function on line 427 or so from this:

    wp_mail($user_email, sprintf(__(‘[%s] Your username and password’), get_settings(‘blogname’)), $message);

    To this:

    wp_mail(‘webmaster@mydomain’, sprintf(__(‘[%s] Your username and password’), get_settings(‘blogname’)), $message);

    So the user does not get their username and password without me sending it to them. This could probably be turned into a plugin pretty easily…and would do it when I have some time.

    Do NOT post it everywhere, please. Post once and at maximum, give some link in related threads, though even that is too much.

    Is there a maximum number of users that can subscribe to a blog? I nioticed that after a hundred or so, I started getting emails from users saying that they were receiving a fatal error from line 31 of wp-register.php

    Fatal error: Call to undefined function: validate_username() in /home/not-telling/public_html/wp-register.php on line 31

    and line 31 is:

    if ( !validate_username($user_login) ) {
    $errors['user_login'] = __('ERROR: This username is invalid. Please enter a valid username.');
    $user_login = '';
    }

    I would personally get the role manager plugin, create a role even more restricted than a subscriber, and then set new users to that new role.

    Then, at your leisure, you can come in, view users, and select all the ones that are newly registered, and change their role in one fell swoop to whatever youw want.

    I would consider that less work than forwarding every email, perhaps you feel differently.

    The role manager plugin is hugely useful, and worth the download anyway, so I recommend checking it out. You can specifically control the rights of each role.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘activate users upon admin approval’ is closed to new replies.