Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activation Email Key doesn’t work?! I may have the fix!!


  • snowlas
    Participant

    @snowlas

    So here is the problem and MY solution. Might not work for you.
    What I’m using: WP 3.3.1, BP 1.5.4, & CIMY Extra Fields 2.3.7

    I register users from my WordPress page, NOT my BuddyPress page. So not myurl.com/register BUT I AM USING myurl.com/wplogin.php?action=register

    What was happening: CIMY generates a key before BuddyPress generates a key. THEN, Buddypress would send out its own email, but WordPress is looking for the CIMY key to activate the user.

    Also, when BuddyPress was sending out the activation email from bp_core_filters.php, NOT bp_members_signup.php. It seems that bp_core_filters.php does not seem to have the function to activate a user, but bp_members_signup.php does.

    When I would register users from my BuddyPress page instead of the WordPress page, the activate email would work just fine. The email was also being sent from bp_members_signup.php, NOT bp_core_filters.php. How do I know? I altered the email message in filters.php, but then got a different email when I registered through BuddyPress and not WordPress.

    Okay. So what did I do?

    bp_core_filters.php was overriding my CIMY activation email. When I disabled BuddyPress, I was able to register users through CIMY and my activation link even said ‘?cimy_key=838494040383830209’ (not a real key, obviously) and not just ‘?key=8393834929282’

    Before you do this, save a clean copy of bp_core_filters.php somewhere different, so if this doesn’t work for you, you can put the old file back in without any problems.

    I went into bp_core_filters.php and DELETED lines 224-255. This starts with:

    ?function bp_core_activation_signup_user_notification( $user, $user_email, $key, $meta ) {

    $activate_url = bp_get_activation_page() . “?key=$key”;
    $activate_url = esc_url($activate_url);
    $admin_email = get_site_option( ‘admin_email’ );

    if ( empty( $admin_email ) )
    $admin_email = ‘support@’ . $_SERVER;?

    Then it ends with, on line 255

    ?add_filter( ‘wpmu_signup_user_notification’, ‘bp_core_activation_signup_user_notification’, 1, 4 );?

    Delete all code between lines 224 and 255. If you have WPMU, above that is the email function for WPMU, in lines 181-222.

    Why am I using CIMY and not just extending the profile fields on BuddyPress? I needed to collect address data. It was a requirement to collect address data from the registration. But, it would then display publicly on the profile in BuddyPress. I couldn’t have that. I just wanted the data in WordPress, hidden. Thus, I’m using CIMY.

    Also, I use CIMY and hide the buddypress admin bar to strangers. I use the plugin login logout and place the widget in a sidebar to direct to the correct login screen, not the buddypress login screen.

    Check it out: http://mediabridges.info

    BuddyPress is running but is not handling any registration, activation, etc. But users can still use it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Editing core is a very bad idea. If that can’t be unhooked or filtered around, submit a ticket to core — patches would be welcome.


    snowlas
    Participant

    @snowlas

    I don’t know enough to write a patch. If someone knows how to make that into a patch, it would be great. As always, I recommended backing up any files you will be editing, so you can replace them as needed.


    9087877
    Inactive

    Every time I hear of this I have to say before anything else disable all plugins except for BP then try a test registration/activation. Even If it sends it to a spam folder in your email then you have used a process of elimination to find the culprit. Most of the time if you are getting your test activations in a spam folder on your email then setting up an email on your host from your domain cures the issue. Something like “admin_yourusername@yourdomain.com” in your cpanel webmail or whatever you have usually fixes this. You may also need to change the email in your dashboard/settings/general E-mail Address to reflect the email you created on your host depending on the host and how they handle mail. Hopefully this will help you. “My advise to anyone is after installing any plugin after BP is to do a test registration/activation each time.” That way you don’t have to sort through 20 plugins to find the one that breaks activation. Oh yeah, and if it activates go ahead and log-in with the username and password you created or the test registration/activation member you created will not show up in the members directory.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Activation Email Key doesn’t work?! I may have the fix!!’ is closed to new replies.
Skip to toolbar