Fix so you don't have to relogin when you update your password.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-05-19 07:05:40 +00:00
parent d4c2db17cb
commit a82011d952
2 changed files with 8 additions and 2 deletions

View File

@ -14,7 +14,7 @@ function veriflog() {
return false;
}
if (!($user_login != ''))
if ('' == $user_login)
return false;
if (!$user_pass_md5)
return false;
@ -23,6 +23,7 @@ function veriflog() {
if (!$login) {
return false;
} else {
if ($login->user_login == $user_login && md5($login->user_pass) == $user_pass_md5) {
return true;

View File

@ -79,7 +79,8 @@ case 'update':
die (__("<strong>ERROR</strong>: you typed two different passwords. Go back to correct that."));
$newuser_pass = $_POST["pass1"];
$updatepassword = "user_pass=MD5('$newuser_pass'), ";
setcookie("wordpresspass_".$cookiehash,md5($newuser_pass),time()+31536000);
setcookie('wordpresspass_'.$cookiehash, " ", time() - 31536000, COOKIEPATH);
setcookie('wordpresspass_'.$cookiehash, md5(md5($newuser_pass)), time() + 31536000, COOKIEPATH);
}
$newuser_firstname=addslashes(stripslashes($_POST['newuser_firstname']));
@ -246,6 +247,10 @@ default:
th { text-align: right; }
</style>
<table width="99%" border="0" cellspacing="2" cellpadding="3">
<tr>
<th width="33%" scope="row"><?php _e('Login:') ?></th>
<td width="73%"><?php echo $profiledata->user_login; ?></td>
</tr>
<tr>
<th width="33%" scope="row"><?php _e('First name:') ?></th>
<td width="73%"><input type="text" name="newuser_firstname" id="newuser_firstname" value="<?php echo $profiledata->user_firstname ?>" /></td>