Make WordPress Core

Changeset 2794


Ignore:
Timestamp:
08/20/2005 01:43:43 AM (19 years ago)
Author:
ryan
Message:

Set nickname during install. Props skippy and markjaquith. fixes #1568

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/install.php

    r2786 r2794  
    172172// Set up admin user
    173173$random_password = substr(md5(uniqid(microtime())), 0, 6);
    174 $wpdb->query("INSERT INTO $wpdb->users (ID, user_login, user_pass, user_email, user_registered) VALUES ( '1', 'admin', MD5('$random_password'), '$admin_email', NOW() )");
     174$display_name_array = explode('@', $admin_email);
     175$display_name = $display_name_array[0];
     176$wpdb->query("INSERT INTO $wpdb->users (ID, user_login, user_pass, user_email, user_registered, display_name, user_nicename) VALUES ( '1', 'admin', MD5('$random_password'), '$admin_email', NOW(), '$display_name', '$display_name')");
    175177$wpdb->query("INSERT INTO $wpdb->usermeta (user_id, meta_key, meta_value) VALUES ({$wpdb->insert_id}, '{$table_prefix}user_level', '10');");
    176178$admin_caps = serialize(array('administrator' => true));
Note: See TracChangeset for help on using the changeset viewer.