The MU forums have moved to WordPress.org

How do I allow the same email for multiple accounts? (14 posts)

  1. erikcw
    Inactive
    Posted 18 years ago #

    Hi all,

    I want to modify my MU to allow users to setup multiple blogs with the same email address. Is it possible to make this tweak without a major hack? Anyone know what file/line to edit?

    Also, how do I display the admin password on the signup thankyou page in addition to having it emailed? Or can I change it so the user gets to choose their own password?

    Thanks!

  2. itdamager
    Member
    Posted 18 years ago #

    Comment out lines 100 and 101 from wpmu-functions.php.

    For the password, try echo'ing $_GLOBALS['random_password'] somewhere inside the function displaySecondForm located in wp-newblog.php.

  3. erikcw
    Inactive
    Posted 18 years ago #

    Great - seems to work fine!

    Quick juestion - will commenting out lines 100-101 cause any problems with MU? Like will it break the user admin functions are anything like that?

    Thanks!

  4. itdamager
    Member
    Posted 18 years ago #

    The only thing it will break is the control that keeps people from signing up multiple times using the same email address, nothing else.

  5. expaand
    Member
    Posted 16 years ago #

    Is this still true? (1.3)

    There are at least two checks to prevent two different users from having the same email address.

    Is this purely for controlling "spam", or is there a fundamental reason why two different users can't have the same email address?

    Because I would like to remove the restriction, if possible...

    Thanks.

  6. andrea_r
    Moderator
    Posted 16 years ago #

    One user with one email address can have as many blogs as they like now. That's what the original thread was about.

    Email addresses are cheap. As in free. it's nothing for someone to set up one so they can sign up into the system. Especially if they want two seperate blogs.

  7. expaand
    Member
    Posted 16 years ago #

    Oh, thanks for the reply. Yes, I see - a single user can have multiple blogs. But each user must have a *unique* email address, I think. This is in the code in at least 2 places. I would like to remove this restriction so that a new user can share the email address of of another user. And I am wondering if is safe to remove this restriction.

  8. andrea_r
    Moderator
    Posted 16 years ago #

    Well, you'd have to hack it , and two I don't think it would be a good idea. In what circumstance would you even *want* two users sharing an email? for one, it woudl be the biggest splog loophole I'd ever seen. In terms of data flow, the email is used as an indentifier to ONE user. Any posts the two email-sharing users would create would show up inder *one* author name.

    I've only seen one case where this goes on in my own setup, and the username chosen is a collective one for three siblings. Yet, each post they write, they have to sign their name. They could have a second blog, and one use the first and another just use the second, but no restrictions were removed either.

  9. expaand
    Member
    Posted 16 years ago #


    In terms of data flow, the email is used as an indentifier to ONE user. Any posts the two email-sharing users would create would show up inder *one* author name.

    This is what I am not sure is true - my impression is that the *logic* uses only the username for this, and not email addresses. So that if two users share an email address, there would be no problem with the system working properly. And that's what itdamager said a long time ago...

  10. lunabyte
    Member
    Posted 16 years ago #

    I wouldn't remove it, honestly.

    Since the same user can have multiple blogs under a single login, I'm not quite sure what the problem is?

    Why manage different logins for different blogs, when you can just use one?

  11. andrea_r
    Moderator
    Posted 16 years ago #

    Well, the code has changed *drasticaly* in a year, so what is suggested above may not apply. Heck, not only could it be a different line number, that action may even be in a different file...

    And what you quoted me saying above is actually true. I'm using a real-life example from a working live setup.

    ONE username is related to ONE email address. The BLOG name is different entirely, as one user can have many blogs. One user can aslo be an author on many blogs, and the email adress is one way to keep it straight.

    So, logically, two people sharing one email address to sign up for one blog where there are two authors does not compute.

  12. expaand
    Member
    Posted 16 years ago #

    Ok, let me try to rephrase. I guess it boils down to fundamental concepts in wordpress mu internals/concepts, about which I know just about nothing, so am trying to learn.

    My impression is, the user login is the key to everything. NOT the email address, and NOT the combination. That is, if my login is 'joe', it fundamentally doesn't matter *what* my email address is. Now, I know that the system currently *does* care about this when adding a user - the add-user code checks to make sure the email address is unique, and if not, you get an error. But is this the *only* place where it matters? If you had two logins with the same email address, would the system break somewhere?

    Yes, I know - a user with a single login can have multiple blogs. But my impression (and believe me, I don't *know*, so am trying to confirm), is that it is the *login* which matters, and not the email address for keeping things straight.

    The *reason* I care about this (fwiw), is I am converting a bunch of existing user sites from a proprietary system I have into mu sites (at least, that's the current plan). Each user has a unique username (login), and most users have a unique email address, but *not all* - an example is similar to what andrea_r mentioned above, where two distinct users are partners, each having a distinct login, but share a single email address for the business.

    Hey, if the email addresses have to be unique, then so be it. I am just trying to figure out if this is true, and why.

    Thanks for your patience on this.

  13. andrea_r
    Moderator
    Posted 16 years ago #

    Here's one reason why: If I add a new blog, and the email already exists in the database, then the new blog is assigned to the user with that email.

    make sense?

    Often, when asking a question, knowing what you want to *really* do helps get a better answer. :)

    So yes, if your existing users share an email, but one users wants her blog, while her hubby wants his blog, they will need seperate email addresses.

    Think of this reason why: a user loses their password. So it sends it to the *email address* on file for that user. If I was sharing an email address with someone, and they wanted to lock me out, they could change the password. See?

    I keep telling you it is true, but you appear to not believe me. :)

    1 user = 1 email.

  14. expaand
    Member
    Posted 16 years ago #

    I would never not believe you, andrea_r! :)

    Thanks for the help: 1 user, 1 email. My new mantra.

About this Topic