Search Results for 'wp user activate'
-
Search Results
-
I currently have an issue with trying to get a custom email to send once a user activates.
When a user does a traditional signup/activation, the email gets sent without any issues.
But when I use plugin to do sign ups via social media, this email does not get sent, and I get the following error when I capture the results of the failed email message.object(WP_Error)#6355 (2) { ["errors"]=> array(1) { ["missing_email"]=> array(1) { [0]=> string(12) "bp_get_email" } } ["error_data"]=> array(1) { ["missing_email"]=> array(2) { [0]=> string(24) "member_activated_account" [1]=> array(6) { ["no_found_rows"]=> bool(true) ["numberposts"]=> int(1) ["post_status"]=> string(7) "publish" ["post_type"]=> string(8) "bp-email" ["suppress_filters"]=> bool(false) ["tax_query"]=> array(1) { [0]=> array(3) { ["field"]=> string(4) "slug" ["taxonomy"]=> string(13) "bp-email-type" ["terms"]=> string(24) "member_activated_account" } } } } } }My code for the custom email creation, and the code to call it is as follows:
function welcome_email_message() { // Do not create if it already exists and is not in the trash $post_exists = post_exists( '[{{{site.name}}}] Welcome to {{{site.name}}}' ); if ( $post_exists != 0 && get_post_status( $post_exists ) == 'publish' ) return; // Create post object $my_post = array( 'post_title' => __( '[{{{site.name}}}] Welcome to {{{site.name}}}', 'buddypress' ), 'post_content' => __( 'Hi {{recipient.name}}, welcome to {{site.name}}! Thankyou for signing up and helping us grow our community. {{site.name}} is a community run service which connects families with the right babysitter or nanny for them. Your new account is all set up and ready to go, you can login with the following information: Username: <strong>{{recipient.username}}</strong> This link will take you to our log in page: <a href="https://bbs4you.com/login/?login=newuser">Login</a> We need you to log in and fill in the details of your profile in order to make the most of our site. Please let us know if you have any issues using the site via the contact us page: <a href="https://bbs4you.com/contact-us/">Contact Us</a> The {{site.name}} Team', 'buddypress' ), // HTML email content. 'post_excerpt' => __( 'Hi {{recipient.firstname}}, welcome to {{site.name}}! Thankyou for signing up and helping us grow our community. {{site.name}} is a community run service which connects families with the right babysitter or nanny for them. Your new account is all set up and ready to go, you can login with the following information: Username: {{recipient.username}} This link will take you to our log in page:Login
We need you to log in and fill in the details of your profile in order to make the most of our site. Please let us know if you have any issues using the site via the contact us page:Contact Us
The {{site.name}} Team.', 'buddypress' ), // Plain text email content. 'post_status' => 'publish', 'post_type' => bp_get_email_post_type() // this is the post type for emails ); // Insert the email post into the database $post_id = wp_insert_post( $my_post ); if ( $post_id ) { // add our email to the taxonomy term 'post_received_comment' // Email is a custom post type, therefore use wp_set_object_terms $tt_ids = wp_set_object_terms( $post_id, 'member_activated_account', bp_get_email_tax_type() ); foreach ( $tt_ids as $tt_id ) { $term = get_term_by( 'term_taxonomy_id', (int) $tt_id, bp_get_email_tax_type() ); wp_update_term( (int) $term->term_id, bp_get_email_tax_type(), array( 'description' => 'A member activates their account', ) ); } } } add_action( 'bp_core_install_emails', 'welcome_email_message' ); function new_member_welcome_email( $user_id, $key = false, $user = false ) { if ( $user_id) { // get the user data $user = get_userdata( $user_id ); // add tokens to parse in email $args = array( 'tokens' => array( 'site.name' => get_bloginfo( 'name' ), 'recipient.firstname' => ucfirst($user->first_name), 'recipient.username' => $user->user_login, ), ); // send args and user ID to receive email bp_send_email( 'member_activated_account', $user_id, $args ); } } add_action( 'bp_core_activated_user','new_member_welcome_email', 99, 2 );Why it works for a normal activation, and not with a OneAll social login account creation seems to confuse me, as the user_id is set and coming through from this point.
For unknown reason I suddenly started getting a page asking me for activation key every time after I register myself as a pretend new user and after clicking on the activation link in the email.
I read a post https://buddypress.org/support/topic/activation-code-after-new-member-registration/ with the same problem saying the activation key is in the email. I tried that so this is an example of the link,
http://localhost/wordpress/activate-3/zhG7gX5p4mtAnSv91K1ePhgBO3V3laWh/
I tried zhG7gX5p4mtAnSv91K1ePhgBO3V3laWh
activate-3/zhG7gX5p4mtAnSv91K1ePhgBO3V3laWh
and the entire url,
but none of them work.In fact, the new user was never created because I checked the Users at admin backend, the new user was never there.
A participant in the post said BP Autologin on Activation plugin solved her this problem but I tried it and it did not work. I think my situation is different from other members in that post because their newly registered members was actually created but mine wasn’t.
I don’t know why this would happen because it never had this problem before.
My site is still localhosted, if that matters.
WP 4.7.3
BP 2.8.2Please help.
Thank you.
Hello!
I am having an issue with BP, that I caused myself. I intentionally deactivated, then deleted, BP (on a 5 day old site) thinking that I wasn’t going to use it. Then I ran ‘WP Optimize’ which removed all the unused tables from the plugins I had installed, and removed unused transients, etc… This is what caused the problem.
Some time later, I went to re-install BP – which succeeds with no issues. Here’s where the issues crop up… Next, I went to create a new Group on the BP front-end, and it reports an error:
There was an error saving group details. Please try again.Enabling WP debug mode in “wp-config.php” reports this:
WordPress database error: [Table 'wordpress.wp_bp_groups' doesn't exist] SELECT id FROM wp_bp_groups WHERE slug = 'create' WordPress database error: [Table 'wordpress.wp_bp_activity' doesn't exist] SELECT id, user_id, date_recorded FROM wp_bp_activity WHERE component = 'members' AND type = 'last_activity' AND user_id IN (1) LIMIT 1 WordPress database error: [Table 'wordpress.wp_bp_activity' doesn't exist] SELECT id, user_id, date_recorded FROM wp_bp_activity WHERE component = 'members' AND type = 'last_activity' AND user_id IN (1) LIMIT 1 WordPress database error: [Table 'wordpress.wp_bp_activity' doesn't exist] SHOW FULL COLUMNS FROM <code>wp_bp_activity</code> WordPress database error: [Table 'wordpress.wp_bp_notifications' doesn't exist] SELECT * FROM wp_bp_notifications n WHERE user_id IN (1) AND component_name IN ('friends','messages','activity','groups','blogs') AND is_new = 1 WordPress database error: [Table 'wordpress.wp_bp_messages_recipients' doesn't exist] SELECT SUM(unread_count) FROM wp_bp_messages_recipients WHERE user_id = 1 AND is_deleted = 0 AND sender_only = 0 WordPress database error: [Table 'wordpress.wp_bp_friends' doesn't exist] SELECT id FROM wp_bp_friends WHERE (initiator_user_id = 1 OR friend_user_id = 1) ORDER BY date_created DESC WordPress database error: [Table 'wordpress.wp_bp_groups_members' doesn't exist] SELECT COUNT(DISTINCT m.group_id) FROM wp_bp_groups_members m, wp_bp_groups g WHERE m.group_id = g.id AND m.is_confirmed = 0 AND m.inviter_id != 0 AND m.invite_sent = 1 AND m.user_id = 1 WordPress database error: [Table 'wordpress.wp_bp_messages_notices' doesn't exist] SELECT id FROM wp_bp_messages_notices WHERE is_active = 1I have been trying to find a solution for this online, for the last 4+ hours… and I have gotten nowhere… So, I am humbly asking for help here, on how to recreate these tables – WITHOUT DELETING AND RECREATING MY ENTIRE SITE. I have nearly 100 hours into this site so far, and I am NOT starting over. Starting over is NOT an option, so please save everyone’s time and skip suggesting this.
I have reviewed all of these links, and followed all of their respective directions, when applicable:
https://buddypress.org/support/topic/reinstall-should-i-delete-old-tables-from-db/
and, many many many many more links, that I am not going to go back and try to find…Any help with this would be great – I’d really like to use BP again… I have seen a number of other people online with this issue, so I know I am not the only one. There has to be some elegant solution to re-create the required SQL tables for the plugin, right?
I have tried running this, after I reinstalled BP the 4th time (with my TDL inserted, ofc):
https://xxxxxx.com/wp-content/plugins/buddypress/bp-core/bp-core-update.php?f=bp_update_to_2_7_4
But, it didn’t seem to do anything…Ubuntu 16.04.1
Apache 2.4.18
PHP 7.0.13
WP 4.7.2
BP 2.7.4
no other BP extension/plugins have been installed since the 1st time removing BPI am more than happy to provide any requested log files!
Thank you a TON in advance!! I look forward to getting this working again.
