ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Members module hack

September 28, 2012 11:30am

Subscribe [1]
  • #1 / Sep 28, 2012 11:30am

    Does anyone out there know of a way to hack the members module or the system core to allow multiple users to have the same email address, without breaking the password recovery feature?

    This was an option that was disabled in an early version of EE2, and I desperately need it back.

  • #2 / Sep 28, 2012 1:45pm

    Bhashkar Yadav

    727 posts

    Hi Poster,

    Yes, there is hack for it.
    You need to go into the file system/expressionengine/libraries/Validate.php and look for method validate_email(). In this method you can comment the code which is checking for duplicate emails.

    Hope this would help you.


    Best Regards,

  • #3 / Sep 28, 2012 3:02pm

    Thank You Bhashkar!

    It also required a change to the system/expressionengine/libraries/EE_Form_validation.php file.

    But I think that did it.

  • #4 / Sep 28, 2012 3:15pm

    Bhashkar Yadav

    727 posts

    glad to know it. 😊

  • #5 / Sep 28, 2012 6:02pm

    Argh!

    The xml member import tool still checks for multiple emails! 😠

  • #6 / Sep 28, 2012 9:59pm

    Bhashkar Yadav

    727 posts

    Poster, which tool or add-on you are using for the XML member import?

  • #7 / Sep 29, 2012 12:12pm

    I’m on version 2.2.2, using the standard Member Import Utility under
    Tools/Utilities/Import Utilities/Member Import Utility

  • #8 / Sep 29, 2012 3:24pm

    Bhashkar Yadav

    727 posts

    Hi Poster,

    I was thinking that you are using any third-party add-on.

    To overcome this, please go into the file system/expressionengine/controllers/cp/tools_utilities.php and look into the method validate_xml().

    Hope here you can check code which are validating for duplicate email address.


    Best Regards,

  • #9 / Sep 29, 2012 3:40pm

    I could not find a third-party add-on to batch import members. There used to be one for EE1, but it was never ported to EE2.

    If you have any add-ons to suggest, please do so, because the member import utility that comes with EE2 is quite tiresome to use.

  • #10 / Sep 29, 2012 3:59pm

    Bhashkar Yadav

    727 posts

    Hi Poster,

    I also had investigated for third-party add-on but couldn’t able to fine.


    Could you please follow my previous post to put some hack into the file system/expressionengine/controllers/cp/tools_utilities.php within the method validate_xml().

    I hope, it would help you to import the member with EE2 tool as par your requirement ....

  • #11 / Sep 29, 2012 4:05pm

    I found some code at line 827 of my EE version, so I commented out the logic that checked the email submitted against an array of the current emails registered. I’ll try it out next week and report back.

    case 'email':
            //if ( ! in_array($tag->value, $e))
            //{
             $e[] = $tag->value;
            //}
            //else
            //{
            // $this->errors[] = array(lang('duplicate_email').$tag->value);
            //}
            $this->validate->email = $tag->value;
            break;
  • #12 / Oct 03, 2012 11:39am

    Success!

    That last bit worked on the Member Import module.

    😊

  • #13 / Oct 03, 2012 3:22pm

    Bhashkar Yadav

    727 posts

    great !!! glad to know 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases