WordPress.org

Ready to get started?Download WordPress

Forums

Registration Approval (11 posts)

  1. crash
    Member
    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.

    http://codex.wordpress.org/User_Levels

  3. crash
    Member
    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
    Member
    Posted 9 years ago #

    because i want to be able to approve my members?

  6. crash
    Member
    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
    Member
    Posted 8 years ago #

    No solution?

  8. Tom Lany
    Member
    Posted 8 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)
    http://wordpress.org/support/topic/53585
    http://wordpress.org/support/topic/35979
    http://wordpress.org/support/topic/35703
    http://wordpress.org/support/topic/39182

    These (below) might also sort of help.

    http://wordpress.org/support/topic/66775
    http://wordpress.org/support/topic/64278

  9. moshu
    Member
    Posted 8 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
    Member
    Posted 8 years ago #

    Sorry. I will stop.

  11. kwesitn
    Member
    Posted 8 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

Tags