The MU forums have moved to WordPress.org

Limit to one blog per user (1 post)

  1. melindakraft
    Member
    Posted 16 years ago #

    I can do asp code all day long, but php, not so much. I'd appreciate any help/advice anyone is willing to provide.

    We will be using WPDirAuth for LDAP authentication, and I need to limit the users to one blog per user only. What I don't want to happen is for users to create more than one blog by repeatedly visiting the signup page.

    I am not familiar with the built in functions and related code to implement my plan. WpDirAuth will create an account for new users automatically when they log in, so I think by adding code to the signup page to check for log in status and pre-existing blog, I can pull off what I need. Here's my pseudo-code:

    if user is logged in, then
    check to see if they already have a blog (will have same name as their user ID)
    if yes, then
    redirect them somewhere else, perhaps a policies page or their blog
    else (no blog yet)
    send them to the signup page (which I will tweak to keep them from changing their blog name from their user id)
    end if
    else (not logged in)
    send them to the log in page
    end if

About this Topic

  • Started 16 years ago by melindakraft