• Resolved nestle499

    (@nestle499)


    I send request confirmation new email and link not workin when I enable plugin

    http://site.com/wp-admin/profile.php?newuseremail=a71292866c16f723c2b1db08e2257c04

    New url dashboard – panel

    Code request:

    $email = sanitize_email($_POST['email']);
    $user = wp_get_current_user();

    if (email_exists($email)) {
    $data = (object)array(
    'email ' => $email,
    'message' => '',
    'errorMessage' => 'The email address is already used'
    );

    echo json_encode($data);
    die();
    }

    $hash = md5($email . time() . wp_rand());
    $new_user_email = array(
    'hash' => $hash,
    'newemail' => $email,
    );
    update_user_meta($user->ID, '_new_email', $new_user_email);

    $sitename = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    $email_text = __(
    'Howdy ###USERNAME###,

    You recently requested to have the email address on your account changed.

    If this is correct, please click on the following link to change it:
    ###ADMIN_URL###

    You can safely ignore and delete this email if you do not want to take this action.

    This email has been sent to ###EMAIL###

    Regards,
    All at ###SITENAME###
    ###SITEURL###'
    );

    $content = apply_filters( 'new_user_email_content', $email_text, $new_user_email );
    $content = str_replace( '###USERNAME###', $user->user_login, $content );
    $content = str_replace( '###ADMIN_URL###', esc_url( self_admin_url( 'profile.php?newuseremail=' . $hash ) ), $content );
    $content = str_replace( '###EMAIL###', $email, $content );
    $content = str_replace( '###SITENAME###', $sitename, $content );
    $content = str_replace( '###SITEURL###', home_url(), $content );

    wp_mail( $email, sprintf( __( '[%s] Email Change Request' ), $sitename ), $content );

    I trying change self_admin_url on new address panel, but link doesn’t work and get 404

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support MaximeWPS

    (@seinomedia)

    Hello,

    Thanks for using WPS Hide Login.

    WPS Hide Login redirects non-loggedin users from wp-admin to 404. If your users aren’t logged in before the request, the plugin behaviour is right.

    Thread Starter nestle499

    (@nestle499)

    Obviously, the retrieve_password() function should generate the correct link to reset the password it is also obvious that the link to confirm the email change that is, hiding the admin panel should not break the basic functionality of users. otherwise it would also be fair to say that deleting all the source files of the panel performs the function of hiding the admin panel or how do you propose to generate these links? obviously this is a problem

    Plugin Support MaximeWPS

    (@seinomedia)

    Hello,

    WPS Hide Login hides login pages to prevent from brute force attacks. If you enable users to log in by a public page, this plugin is useless.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.