[wp-cvs] wordpress wp-login.php,1.58,1.59

Matthew Mullenweg saxmatt at users.sourceforge.net
Mon Feb 7 06:43:25 GMT 2005


Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1017

Modified Files:
	wp-login.php 
Log Message:
Mail and reset fixes

Index: wp-login.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-login.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** wp-login.php	5 Feb 2005 02:22:36 -0000	1.58
--- wp-login.php	7 Feb 2005 06:43:23 -0000	1.59
***************
*** 104,108 ****
  	$message .= __("To reset your password visit the following address, otherwise just ignore this email and nothing will happen.\n\n");
  	$message .= get_settings('siteurl') . "/wp-login.php?action=resetpass&key=$key";
! mail($user_email, sprintf(__("[%s] Password Reset"), get_settings('blogname')), $message);
  	$m = wp_mail($user_email, sprintf(__("[%s] Password Reset"), get_settings('blogname')), $message);
  
--- 104,108 ----
  	$message .= __("To reset your password visit the following address, otherwise just ignore this email and nothing will happen.\n\n");
  	$message .= get_settings('siteurl') . "/wp-login.php?action=resetpass&key=$key";
! 
  	$m = wp_mail($user_email, sprintf(__("[%s] Password Reset"), get_settings('blogname')), $message);
  
***************
*** 129,135 ****
  		die( __('Sorry, that key does not appear to be valid.') );
  
! 	$new_pass = md5( substr( md5( uniqid( microtime() ) ), 0, 7) );
!  	$wpdb->query("UPDATE $wpdb->users SET user_pass = '$new_pass', user_activation_key = '' WHERE user_login = '$user->user_login'");
! 	$message  = __('Login') . ": $user_login\r\n";
  	$message .= __('Password') . ": $new_pass\r\n";
  	$message .= get_settings('siteurl') . '/wp-login.php';
--- 129,135 ----
  		die( __('Sorry, that key does not appear to be valid.') );
  
! 	$new_pass = substr( md5( uniqid( microtime() ) ), 0, 7);
!  	$wpdb->query("UPDATE $wpdb->users SET user_pass = MD5('$new_pass'), user_activation_key = '' WHERE user_login = '$user->user_login'");
! 	$message  = __('Login') . ": $user->user_login\r\n";
  	$message .= __('Password') . ": $new_pass\r\n";
  	$message .= get_settings('siteurl') . '/wp-login.php';
***************
*** 146,154 ****
  		echo '<p>' .  sprintf(__("Your new password is in the mail."), $user_login) . '<br />';
          echo  "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
- 		die();
- 	}	
- 	
  		// send a copy of password change notification to the admin
! 		wp_mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), sprintf(__('Password Lost and Changed for user: %s'), $user_login));
  break;
  
--- 146,153 ----
  		echo '<p>' .  sprintf(__("Your new password is in the mail."), $user_login) . '<br />';
          echo  "<a href='wp-login.php' title='" . __('Check your e-mail first, of course') . "'>" . __('Click here to login!') . '</a></p>';
  		// send a copy of password change notification to the admin
! 		wp_mail(get_settings('admin_email'), sprintf(__('[%s] Password Lost/Change'), get_settings('blogname')), sprintf(__('Password Lost and Changed for user: %s'), $user->user_login));
! 		die();
! 	}
  break;
  



More information about the cvs mailing list