Changeset 851
- Timestamp:
- 02/09/2004 10:07:27 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-login.php
r850 r851 162 162 <html xmlns="http://www.w3.org/1999/xhtml"> 163 163 <head> 164 <title>WordPress >Lost password ?</title>164 <title>WordPress › Lost password ?</title> 165 165 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 166 166 <link rel="stylesheet" href="<?php echo $siteurl; ?>/wp-admin/wp-admin.css" type="text/css" /> … … 177 177 178 178 <div id="login"> 179 <p> Type your login here and click OK. You will receive an email with your password.</p>179 <p>Please enter your information here. We will send you a new password. </p> 180 180 <?php 181 181 if ($error) echo "<div align=\"right\" style=\"padding:4px;\"><font color=\"#FF0000\">$error</font><br /> </div>"; … … 184 184 <form name="" action="wp-login.php" method="post" id="lostpass"> 185 185 <input type="hidden" name="action" value="retrievepassword" /> 186 <label>Login: <input type="text" name="user_login" id="user_login" value="" size="12" /></label> 186 <label>Login: <input type="text" name="user_login" id="user_login" value="" size="12" /></label><br /> 187 <label>Email: <input type="text" name="email" id="email" value="" size="12" /></label><br /> 187 188 <input type="submit" name="Submit2" value="OK" class="search"> 188 189 … … 203 204 $user_data = get_userdatabylogin($user_login); 204 205 $user_email = $user_data->user_email; 205 $user_pass = $user_data->user_pass; 206 207 if (!$user_email) die('Sorry, that user does not seem to exist in our database. Perhaps you have the wrong username?'); 206 207 if (!$user_email || $user_email != $_POST['email']) die('Sorry, that user does not seem to exist in our database. Perhaps you have the wrong username or email address? <a href="wp-login.php?action=lostpassword">Try again</a>.'); 208 // Generate something random for a password... md5'ing current time with a rand salt 209 $user_pass = substr((MD5("time" . rand(1,16000))), 0, 6); 210 // now insert the new pass md5'd into the db 211 $wpdb->query("UPDATE wp_users SET user_pass = MD5('$user_pass') WHERE user_login = '$user_login'"); 208 212 $message = "Login: $user_login\r\n"; 209 213 $message .= "Password: $user_pass\r\n";
Note: See TracChangeset
for help on using the changeset viewer.