Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • @diegoliv

    Participant

    Ok, maybe I got the source of the problem. I use this code below to change the text from the e-mail with the activation code:

    
    <?php
     
    function bp_change_activation_mail_text( $message ) {
     
    //  Get some globals
    	global $bp, $wpdb;
     
      //  Get username from the signup form just posted
      $username = $bp->signup->username;
     
      //  SQL query to get activation key for that username
      $sql = 'select meta_value from wp_usermeta where meta_key="activation_key" and user_id in ( select ID from wp_users where user_login="' . $username . '" and user_status=2 )';
     
      //  Getting the activation key from the database
      $activation_key = $wpdb->get_var($sql);
     
      $activate_url = bp_get_activation_page() ."?key=$activation_key";
      $activate_url = esc_url( $activate_url );
     
      //  Custom message with activation key
      $message = "Obrigado por registrar-se no Espaço Tesla!\n\n Para completar a ativação de sua conta, por favor, clique no link abaixo:\n\n$activate_url\n\n";
     
      return $message;
     
    }
     
    add_filter( 'bp_core_signup_send_validation_email_message', 'bp_change_activation_mail_text' );
    

    Maybe there is something wrong with the query that could sometimes return an empty result? When I remove this filter, the default text is sent with the correct activation link.

    @diegoliv

    Participant

    Hi, folks,

    I’ve seen that this thing of activation e-mail is quite a headache for some people using BP. I’m currently having some trouble too. Most of the time, when a user creates an account on the site I’m working on, the e-mail with the activation link is sent ok. But for some users, the link on the e-mail comes without the key (something like http://www.site.com/activate/?key=), what results in the page asking a activation key. The problem is that I can’t reproduce the issue, but I received even a print screen from an user showing that the problem indeed exist.

    I’ve installed Unconfirmed plugin to check if there is users that are not confirmed, and there are a couple of users. I can see the activation key for every unconfirmed user. What can be causing this issue?

    I’m currently using Buddypress 1.8.1, bbPress 2.4.1, and for the themed login, I’m using Theme My Login 6.3.9. I’m using too WordPress Social Login 2.1.3 for give users a social login option. To style the e-mails, I’m using WP Better Emails 0.2.6.5.

    Thanks for any help!

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar