Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Beautiful. Thanks for the info!

    Well, I figured it out.

    The e-mail address started with a character that was in the authorization pending string. So ltrim() was trimming the first character off the e-mail address. Here’s how I fixed it:

    First, in my wp-config.php, I added this line:

    define(‘AP_STRING’, ‘ENTER_UNIQUE_STRING_HERE’);
    Because of another bug, it’s very important that your unique string is very unique (more on this later). I went to grc.com/pass and grabbed about 8 digits worth of junk.

    In the wp-register.php file, change the line that the hack says to change to ‘$user_email=”ap-$user_email”;’ to ‘ $user_email= AP_STRING . “-$user_email”; ‘

    Now, go through the hack instructions, and everywhere you find ‘ ltrim( $user_email, “ap-” ); ‘, change it to ‘ substr( $user_email, strlen(AP_STRING)+1); ‘ .

    That should do it… unless I forgot something in the instructions.

    There is still a flaw here. In the user-edit.php file, the second line that we added, ‘ $checkemailb=explode(“-“,$checkemail); ‘. Has a problem. If somebody’s email address starts with your AP_STRING, then WP thinks they’re still not authorized. You have to authorize them twice, which ends up messing up their email address.

    So for now, just come up with a long, very unique AP_STRING. Something like ‘s1n7Thy66’. I guess the long term solution would be to add the AP_STRING at the end of their email, since email@whatever.com-s1n7Thy66 isn’t valid, nobody will have that email address.

    Let me know if I forgot anything.

    MediaTricks- That is exactly what I am looking for. But I ran into a problem. I’ve double checked my code to make sure I did it right, and I’m pretty sure I did. The user e-mail address is losing it’s first letter. ie: myemail@whatever.com becomes yemail@whatever.com. I looked around to make sure all my dashes are where they’re supposed to be an not where they’re not supposed to be according to your document, and still no joy.

    Specifically here’s what happens:

    I register) username: testuser, email: myemail@whatever.com
    The next screen comes up and says “Pending approval.. blah blah, Email: yemail@whatever.com”.
    Using phpMyAdmin, I investigate a little further. In the table the e-mail field for that user is ap-myemail@whatever.com.

    Then I click the link in the email to approve the user. Their e-mail shows up as ap-myemail@whatever.com . I click approve and send welcome email, and the email field changes to yemail@whatever.com

    I looked around the code in user-edit where explode() is called, but I can’t find anything wrong.

    I’m running PHP5

    Any Ideas?

    Thanks

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