mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
First cut and better admin SSL support. see #7001
git-svn-id: https://develop.svn.wordpress.org/trunk@7998 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+3
-3
@@ -137,7 +137,7 @@ function retrieve_password() {
|
||||
$message .= get_option('siteurl') . "\r\n\r\n";
|
||||
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
|
||||
$message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n";
|
||||
$message .= get_option('siteurl') . "/wp-login.php?action=rp&key=$key\r\n";
|
||||
$message .= site_url("wp-login.php?action=rp&key=$key") . "\r\n";
|
||||
|
||||
if ( !wp_mail($user_email, sprintf(__('[%s] Password Reset'), get_option('blogname')), $message) )
|
||||
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
|
||||
@@ -174,7 +174,7 @@ function reset_password($key) {
|
||||
wp_set_password($new_pass, $user->ID);
|
||||
$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
|
||||
$message .= sprintf(__('Password: %s'), $new_pass) . "\r\n";
|
||||
$message .= get_option('siteurl') . "/wp-login.php\r\n";
|
||||
$message .= site_url('wp-login.php') . "\r\n";
|
||||
|
||||
if ( !wp_mail($user->user_email, sprintf(__('[%s] Your new password'), get_option('blogname')), $message) )
|
||||
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
|
||||
@@ -405,7 +405,7 @@ default:
|
||||
if ( !is_wp_error($user) ) {
|
||||
// If the user can't edit posts, send them to their profile.
|
||||
if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )
|
||||
$redirect_to = get_option('siteurl') . '/wp-admin/profile.php';
|
||||
$redirect_to = admin_url('profile.php');
|
||||
wp_safe_redirect($redirect_to);
|
||||
exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user