The MU forums have moved to WordPress.org

Bug+Fix: Cannot change admin e-mail (5 posts)

  1. DrLobo
    Member
    Posted 17 years ago #

    Hello,

    I have found a bug: when changing the admin e-mail, a mail is sent to the new address with a hash code to confirm the change. But after following the link, the old e-mail address is stil there...

    I have debuged the code and found out that the new e-mail address should be saved in the options with the hash code to check the confirmation. The issue is that the new e-mail is never saved in options...

    to fix that, edit wp-admin/admin-functions.php

    and add update_option('new_admin_email',$newadminemail);

    in the function update_option_new_admin_email like below:


    function update_option_new_admin_email($old_value, $value) {
    if ( $value == get_option( 'admin_email' ) || !is_email( $value ) )
    return;

    $hash = md5( $value.time().mt_rand() );
    $newadminemail = array(
    "hash" => $hash,
    "newemail" => $value
    );
    update_option('new_admin_email',$newadminemail);

  2. drmike
    Member
    Posted 17 years ago #

    What version of WPMU are you running? I thought Donncha had gotten all of these.

    You may want to enter this over on teh trac:

    http://trac.mu.wordpress.org

    That's where actual bugs and their fixes go.

    Thanks,
    -drmikeq

  3. DrLobo
    Member
    Posted 17 years ago #

    I'm using a nightly build from mid-october.

    I have checked the code in Trac and the issue is not fixed.

    How can I create a ticket in Trac? I didn't see any link to create a ticket or register a new account.

  4. andrea_r
    Moderator
    Posted 17 years ago #

    You should be able to log in to trac with the same account as here.

  5. supor1t
    Member
    Posted 17 years ago #

    I just started investigating this same issue.

    Your solution worked like a charm.

    Thank you for posting the fix DrLobo!

About this Topic