Verification Email no link code showing when adding new users

question on this part for /wp-admin/user-new.php

function admin_created_user_email( $text ) {
return sprintf( __( "Hi,
You've been invited to join '%s' at
%s as a %s.<br />
If you do not want to join this blog please ignore
this email. This invitation will expire in a few days.</p>
<p>Please click the following link to activate your user account:
%%s" ), get_bloginfo('name'), site_url(), wp_specialchars( $_REQUEST[ 'role' ] ) );
}

when my members tried to add new user to their admin panel, the email sent to the user has no verification link code.

what do you think should I do to fix this porblem thanks

  • Andrew
    • Champion of Loops

    Hiya,

    Did that code appear in the email itself instead of the activation link or are you just providing the relevant code from user-new.php? Just need to clarify what kind of problem we’re looking at here (no link at all or code instead of link) :slight_smile:

    Thanks,

    Andrew

  • Nemego
    • Flash Drive

    also on what I observe on user-new.php

    this part on the code

    Please click the following link to activate your user account:

    %%s

    there is no value to the activation link on the function

    function admin_created_user_email(

    so it just show %s on the email for the activation link. this works on when user try to register but when user try to add new user to the admin panel it is not working for the verification link.

    thanks

  • Andrew
    • Champion of Loops

    Hiya,

    I just tried this feature on a fresh 2.9.1.1 install as well as a install upgraded from 2.8.6. On both installs the email was sent with the activation link. So, this is most likely caused by one of two things:

    1) A bug in 2.9.1 – unlikely but possible – there are other known bugs though. So you should upgrade anyway

    2) A plugin – Try removing all plugins (temporarily rename mu-plugins and /plugins/). If the problem is solved then add the plugins back in one at a time until you find the one causing the trouble.

    Thanks,

    Andrew

  • Nemego
    • Flash Drive

    about disabling the problem, even I disabled the plugins, there is still no link verification that I got when I’m at the users admin panel.

    my members complaining about this problem that when they try to add new user on their admin panel there is no verification link, so I decided to modify the user-new.php

    here is the updated code that I did so it will get the verification key and show the link verication on the email.

    function admin_created_user_email( $text ) {

    global $wpdb;

    $user_details = $wpdb->get_row( $wpdb->prepare("SELECT activation_key FROM $wpdb->signups WHERE user_email = %s", $_REQUEST[ 'email' ]) );

    $uikey=$user_details->activation_key;

    return sprintf( __( "Hi,

    You've been invited to join '%s' at

    %s as a %s.

    If you do not want to join this blog please ignore

    this email. This invitation will expire in a few days.

    Please click the following link to activate your user account:

    %s" ), get_bloginfo('name'), site_url(), wp_specialchars( $_REQUEST[ 'role' ] ), site_url( "wp-activate.php?key=$uikey" ) );

    }

    add_filter( 'wpmu_signup_user_notification_email', 'admin_created_user_email' );

    I hope this help other members if ever they encounter this problem.

    thanks