Changeset 11326
- Timestamp:
- 05/14/2009 06:54:33 AM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/upgrade.php
r11323 r11326 21 21 if ( !function_exists('wp_install') ) : 22 22 /** 23 * {@internal Missing Short Description}}23 * Installs the blog 24 24 * 25 25 * {@internal Missing Long Description}} … … 32 32 * @param bool $public Whether blog is public. 33 33 * @param null $deprecated Optional. Not used. 34 * @return array Array keys 'url', 'user_id', 'password' .34 * @return array Array keys 'url', 'user_id', 'password', 'password_message'. 35 35 */ 36 36 function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') { … … 60 60 if ( !$user_id ) { 61 61 $random_password = wp_generate_password(); 62 $message = __('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.'); 62 63 $user_id = wp_create_user($user_name, $random_password, $user_email); 63 64 update_usermeta($user_id, 'default_password_nag', true); 64 65 } else { 65 $random_password = __('User already exists. Password inherited.'); 66 $random_password = ''; 67 $message = __('User already exists. Password inherited.'); 66 68 } 67 69 … … 77 79 wp_cache_flush(); 78 80 79 return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $random_password );81 return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $random_password, 'password_message' => $message); 80 82 } 81 83 endif; -
trunk/wp-admin/install.php
r11301 r11326 137 137 <tr> 138 138 <th><?php _e('Password'); ?></th> 139 <td><code><?php echo $password; ?></code><br /> 140 <?php echo '<p>'.__('<strong><em>Note that password</em></strong> carefully! It is a <em>random</em> password that was generated just for you.').'</p>'; ?></td> 139 <td><?php if ( !empty( $password ) ) { 140 echo '<code>'. $password .'</code><br />'; 141 } 142 echo '<p>'. $password_message .'</p>'; ?></td> 141 143 </tr> 142 144 </table>
Note: See TracChangeset
for help on using the changeset viewer.