Skip to:
Content
Pages
Categories
Search
Top
Bottom

Registering with another users email ???


  • 724719
    Inactive

    I just realised that two users can have the same email address, is it possible to give an error message if a user tries to register with an existing email.

    I cant find a plugin for it.

    any help appreciated please.

Viewing 10 replies - 1 through 10 (of 10 total)

  • _ck_
    Participant

    @_ck_

    Whoa I never realized that.

    I wonder if it’s also that way on the WordPress side.

    Well it shouldn’t be too hard to whip up some code for that.


    724719
    Inactive

    that means people can keep sign-up new accounts to give them selfs Karma points….

    i dont mean to sound like a prick __ck__ but can you whip up some sort of plugin for this problem or some instructions. becuase i wouldnt know where to start let alone code somthing like that.

    EDIT: WordPress has it goin ok, I get the message:-

    ERROR: This email is already registered, please choose another one.

    when registering an already existing email.


    chrishajer
    Participant

    @chrishajer

    Why is it a problem to use someone else’s email address? The password email would go to that email address, correct? So how would the person using someone else’s email address benefit from that?

    Impersonation might be a cause for concern. Plus, there’s ye olde sockpuppet issue, which some forums expressly forbid.


    _ck_
    Participant

    @_ck_

    Yes, this is why I always recommend to people when integrating with WordPress that they redirect all login and registration links to the wordpress side. It’s had years of development in that area.

    In any case, here is a simple plugin to prevent duplicate email addresses. Unfortunately bbPress has no way to place custom error messages on the page without template hacking but this should do:

    <?php
    /*
    Plugin Name: no duplicate email addresses
    Author: _ck_
    */

    if ($_POST && bb_get_location()=="register-page") {add_filter('bb_verify_email','no_duplicate_email');}

    function no_duplicate_email($email) {
    if ($email) {global $bbdb; if (!$bbdb->get_row($bbdb->prepare("SELECT * FROM $bbdb->users WHERE user_email = %s", $email))) {return $email;}
    else {add_action('bb_foot','no_duplicate_email_alert'); return false;}}
    }
    function no_duplicate_email_alert() {echo "<scr"."ipt>alert('".__("email address already registered")."');</script>";}
    ?>

    (bbPress 0.9 or higher required)

    Sorry for the tangent _ck_ but… you really recommend redirecting all logins to WP, too? As in, this silly thing I just posted about “unifying” registration on the WP side?


    _ck_
    Participant

    @_ck_

    Well login integration is not as important as the register part. As far as your instructions, I wouldn’t recommend deleting the contents of a core file but the redirect part is okay.

    It occurs to me, it’s actually possible to redirect the register page in bbpress to the wordpress side via plugin with no edits required anywhere.

    Remember that bbPress registration process should catch up to the WordPress side eventually. In fact I like it’s layout better but WordPress’s is more mature code-wise.

    The sole (arguably flimsy) reason I cleaned-out the register.php file is pure paranoia: to avoid directly injected calls that somehow (mysteriously) don’t get caught by Apache (htaccess).

    Let’s say I’m not too confident in my mad php skillz to write such a plugin… I’ll try it with a redirect instead.


    _ck_
    Participant

    @_ck_

    nv1962, it would be a good plugin to learn/practice from. Roughly 3-5 lines total. Essentially you’d add an action to bb_send_headers and just like my plugin above, if the bb_get_location==”register-page” you echo the redirect header for the wordpress page (and then do a die() so no other code can execute until it redirects).


    724719
    Inactive

    yeah sorry ck basically i meant that STOPPING people from having more than one account with the same email address can be a way of addressing the issue of “Multiple Accounts”.

    because if the user really wanted to make another account he/she would have to go through the annoying/lengthly process of creating another gmail/hotmail account. But the current issue is that it only takes literally 5 seconds to create another account becuase the new account details will be sent to the same email address over and over again.

    anyway, i never thought of the redirecting I guess im just losing alot of sleep, yeahs nice idea. .htaccess

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar