[HOW TO] Removing Email Activation [1.9.2]+

Theme support is offered to verified customers by forum only. Support requests and solutions made by email, Skype, Envato or any other method will be redirected back to the forum.

This topic is: not resolved
  • Sticky
    Posted in: BlackFyre  

  • Member
    ShiftedDesign
    April 15, 2016 at 6:12 pm #80582

    I’m remaking my tutorial since a few things have change and some users are unable to find what I had mentioned before and people are still asking about it.
    If you are using 1.9.2 you can simply replace page-user-registration.php with the attached one. (be sure to un-zip it)

    If you are using a later version of blackfyre the file may still work but you can follow these simple steps:

    1. Open page-user-registration.php find line 128 which contains the following line:

    add_user_meta( $new_user_id, ‘active’, ‘false’ );

    We need to make ‘false’, ‘active. This will make the users automatically active and dont have to use an activation link. So the new line will read:

    add_user_meta( $new_user_id, ‘active’, ‘true’ );

    2. Next we are looking at lines 129-135 which contain:

    $subject = esc_html__(‘From ‘,’blackfyre’).get_bloginfo();
    $message = esc_html__(“Username:”,’blackfyre’).” $user_id \n\n”. esc_html__(“Password: “,’blackfyre’). “$userpassword”;
    $message .= “\n\n”;
    $message .= esc_html__(‘Please click this link to activate your account: ‘,’blackfyre’);
    $message .= esc_url(blackfyre_get_permalink_for_template(‘page-user-activation’)).’?id=’.$new_user_id.’&key=’.$hash;
    $headers = ‘From: ‘.get_bloginfo().’ <‘.get_option(“admin_email”).’>’ . “\r\n” . ‘Reply-To: ‘ . $user_email;
    wp_mail( $user_email, $subject, $message, $headers );

    We are just going to delete all of this. This will stop the email entirely. Now that we have removed the email we need to change the message to tell people to login instead of looking for an email.

    3. Go to line 233 (240 if you haven’t removed the lines for the email yet) which reads:

    <?php esc_html_e(” Registration successful. Activation email has been sent!”, “blackfyre”); } else{ ?>

    Lets change it to read something like this:

    <?php esc_html_e(“Registration successful! You can now login!”, “blackfyre”); } else{ ?>

    Attachments:
    You must be logged in to view attached files.

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.