The MU forums have moved to WordPress.org

Patch to fix lack of admin email notification (15 posts)

  1. kenlalonde
    Member
    Posted 17 years ago #

    Here's a patch against today's build. It corrects a bug that prevented the initial email to admin from going out, and corrects an URL on the post-blog-activation page.

    diff -ru /tmp/wpmu-2006-06-05/index.php ./index.php
    --- /tmp/wpmu-2006-06-05/index.php Sun May 14 23:19:56 2006
    +++ ./index.php Mon Jun 5 11:40:40 2006
    @@ -383,6 +383,7 @@
    wpmu_create_blog( $domain, $base, $weblog_title, $user_id, array() );
    update_blog_option( 1, 'template', 'home');
    update_blog_option( 1, 'stylesheet', 'home');
    + wpmu_welcome_notification(1, $user_id, $pass, $weblog_title, '');
    print "<p>Congrats! Your blog has been set up and you have been sent details of your login and password in an email.</p>";
    }

    diff -ru /tmp/wpmu-2006-06-05/wp-inst/wp-activate.php ./wp-inst/wp-activate.php
    --- /tmp/wpmu-2006-06-05/wp-inst/wp-activate.php Sun May 14 23:19:56 2006
    +++ ./wp-inst/wp-activate.php Fri Jun 2 17:58:33 2006
    @@ -68,7 +68,7 @@
    </td>
    </tr>
    </table>
    -<h3 class="view"><?php printf(__('<a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, 'http://wordpress.com/'); ?></h3>
    +<h3 class="view"><?php printf(__('<a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php'); ?></h3>
    <?php
    }
    }
    diff -ru /tmp/wpmu-2006-06-05/wp-inst/wp-includes/wpmu-functions.php ./wp-inst/wp-includes/wpmu-functions.php
    --- /tmp/wpmu-2006-06-05/wp-inst/wp-includes/wpmu-functions.php Mon May 15 08:35:09 2006
    +++ ./wp-inst/wp-includes/wpmu-functions.php Mon Jun 5 11:05:00 2006
    @@ -1023,7 +1023,7 @@
    $user_id = username_exists($user_login);

    if ( ! $user_id )
    - $user_id = wpmu_create_user($user_login, $user_email, $password);
    + $user_id = wpmu_create_user($user_login, $password, $user_email);

    if ( ! $user_id )
    return new WP_Error('create_user', __('Could not create user'));
    @@ -1058,7 +1058,7 @@
    return false;
    // Check email too?

    - $user_id = wp_create_user( $user_name, $email, $password);
    + $user_id = wp_create_user( $user_name, $password, $email);
    $user = new WP_User($user_id);
    // Newly created users have no roles or caps until they are added to a blog.
    update_user_option($user_id, 'capabilities', '');

  2. subnet_rx
    Member
    Posted 17 years ago #

    so this will be in tomorrow's build?

  3. woody24
    Member
    Posted 17 years ago #

    how does one go about patching? I guess I can just start all over.

  4. MazZziKa
    Member
    Posted 17 years ago #

    not fixed i try it :s

  5. ladeem
    Member
    Posted 17 years ago #

    Well ... it worked as far as correcting the issue w/ the email, but I still get the spawn_pinger() error (on every page), and got an error (Warning: Invalid argument supplied for foreach() in /home/**/public_html/wp-inst/wp-admin/profile-update.php on line 13) when trying to update my admin password. Thanks for trying to come up w/ a workaround, tho! ;)

    LadeeM

  6. Raxy
    Member
    Posted 17 years ago #

    Why do you make life so hard? it still doesn't work. Could anybody please tell where to put the above text to? to which files and which lines?

    Why is it so difficult to make so that Admin can choose his own login and password?
    Is there any other way to learn out my passwpord and login?

  7. billdennis5
    Member
    Posted 17 years ago #

    I have found that most of the people who use this site are axperiences coders. For these, the words "here's a patch" is enough.

    The rest are like me, they need to have things explained.

  8. Raxy
    Member
    Posted 17 years ago #

    I guess I will have to uninstall it cuz admin passpord and username never arrived

  9. Walied
    Member
    Posted 17 years ago #

    Easy workaround to create your passport without the patch is to run the command on MySql

    ===================================================
    UPDATE wp_users SET user_pass = MD5('choose your password here'), user_activation_key = '' WHERE user_login = 'admin';
    ===================================================

    Then you can login with your new password you have choosen in the MySql Command to your Admin Dashboard

    Enjoy

  10. woody24
    Member
    Posted 17 years ago #

    I found an changed my password in the MySql database, but I don't know where the dashboard is. I did the setup at http://www.domain.com/wpmu, but now when I go to that location, it tells me that its 404 not found. And if I go to http://www.domain.com/wpmu/index.php it bumps me to the root domain.

    This setup isn't as easy as others have said. I believe that I have everything I need, and everything is turned on.

  11. MazZziKa
    Member
    Posted 17 years ago #

    u have to change the e-mail in phpmyadmmin
    .. nice mdwana walied ;)

  12. woody24
    Member
    Posted 17 years ago #

    yeah, I guess this is all over my head. I thought I would be able to figure it out. Guess I'll just let it go.

  13. naderc
    Member
    Posted 17 years ago #

    Using the latest nightly build (as of now) and getting a blank screen with error message after logging in. Should get the dashboard.

    Error message is:
    Warning: Cannot modify header information - headers already sent by (output started at /home/kaiserschnitt/www/wp-config.php:31) in /home/kaiserschnitt/www/wp-includes/pluggable.php on line 278

    Anybody know?

  14. drmike
    Member
    Posted 17 years ago #

    Oh, great. Here's the thread where he or she actually posted the error.

    *sigh*

    My money is on you having empty spaces and/ or lines at the end of your wp-config.php file. Please make sure that there is nothing after the last '>' mark.

  15. naderc
    Member
    Posted 17 years ago #

    sorry drmike. i'm just desperate and nobody would answer me.
    i had looked for everything and since i'm quite experienced with normal WP i would have never thought of this error to happen.

    the empty line at the end of the wp-config file was it. crazy.

    thanks and sorry again.

About this Topic

  • Started 17 years ago by kenlalonde
  • Latest reply from naderc