Registration Approval (11 posts)

  1. crash
    Posted 9 years ago #

    Hello all

    I am currently working on a way for a blog admin to be able to approve blog registrations.

    The easiest way I see of accomplishing this is enabling registration, but setting the new user's user_level to -1 during registration. From what I can see, this will effectively make one registered, but not a user. The only thing one can then do is login and see the dashboard. One cannot even edit his user info. The admin can then upgrade a user's user_level to 0-9.

    There are some drawbacks to this method.

    First, the user_level field type will need to be changed

    Second, nothing about user registration is hookable =/ (*cough* devs), so wp_register.php will have to be hacked, and user administration may need to be hacked (I have not looked at hook-ability there)

    Am I missing other drawbacks? Or is there a better way of accomplishing registration approval?

    I'd like to hear input :)

  2. I don't know of any methods for this yet, but you can be rest assured that newly registered users won't be able to do much. They are created with a user level of 0. A user with a level of 0 can login, edit their own profile, and see the Dashboard, Users/Your Profile, and the existing posts. That is all they can do.


  3. crash
    Posted 9 years ago #

    Well, there is a problem with that.

    If i use 0 as "registered" and 1 as "approved" user_level, then all my approved users will be able to write drafts, something I don't really want :)

  4. Why not leave them at 0?

  5. crash
    Posted 9 years ago #

    because i want to be able to approve my members?

  6. crash
    Posted 9 years ago #

    After looking around some more, i have decided that there are too many files that need to be hacked to make this work. So I will have to content myself with letting approved users write drafts.

  7. kwesitn
    Posted 9 years ago #

    No solution?

  8. Tom Lany
    Posted 9 years ago #

    I decided to compile links to all of the threads on this topic and post them on all of the threads on the topic. Maybe this will spark an idea for someone.

    See these threads:

    http://wordpress.org/support/topic/58132 (most recent)

    These (below) might also sort of help.


  9. moshu
    Posted 9 years ago #

    Please stop posting all these links! Double posting (triple etc.) is considered very rude thing around here and usually is not tolerated.

  10. Tom Lany
    Posted 9 years ago #

    Sorry. I will stop.

  11. kwesitn
    Posted 9 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic