Activation Email Key doesn’t work?! I may have the fix!!
-
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.7I 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.
- The topic ‘Activation Email Key doesn’t work?! I may have the fix!!’ is closed to new replies.