diff --git wp-includes/pluggable.php wp-includes/pluggable.php
index 794565f..5891846 100644
|
|
function wp_new_user_notification($user_id, $plaintext_pass = '') { |
1287 | 1287 | // we want to reverse this for the plain text arena of emails. |
1288 | 1288 | $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); |
1289 | 1289 | |
| 1290 | $subject = sprintf(__('[%s] New User Registration', $blogname)); |
| 1291 | $email = get_option('admin_email'); |
| 1292 | |
1290 | 1293 | $message = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n"; |
1291 | 1294 | $message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n"; |
1292 | 1295 | $message .= sprintf(__('E-mail: %s'), $user->user_email) . "\r\n"; |
1293 | 1296 | |
1294 | | @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message); |
| 1297 | /** |
| 1298 | * Fires before sending a new user notification by email to that blog's admin. |
| 1299 | * |
| 1300 | * To override the email, or cancel it altogether, apply your custom logic |
| 1301 | * and return false. |
| 1302 | * |
| 1303 | * @since 3.9.0 |
| 1304 | * |
| 1305 | * @param boolean $send return false to prevent WP from sending an email |
| 1306 | * @param int $user_id User ID |
| 1307 | * @param string $plaintext_pass Optional. The user's plaintext password |
| 1308 | */ |
| 1309 | if (apply_filters('wp_new_user_notification_admin', true, $user_id, $plaintext_pass)) { |
| 1310 | WP_DEBUG ? wp_mail($email, $subject, $message) : @wp_mail($email, $subject, $message); |
| 1311 | } |
1295 | 1312 | |
1296 | 1313 | if ( empty($plaintext_pass) ) |
1297 | 1314 | return; |
1298 | 1315 | |
| 1316 | $subject = sprintf(__('[%s] Your username and password'), $blogname); |
| 1317 | $email = $user->user_email; |
| 1318 | |
1299 | 1319 | $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n"; |
1300 | 1320 | $message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n"; |
1301 | 1321 | $message .= wp_login_url() . "\r\n"; |
1302 | 1322 | |
1303 | | wp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message); |
1304 | | |
| 1323 | /** |
| 1324 | * Fires before sending a new user notification by email to that new user. |
| 1325 | * |
| 1326 | * To override the email, or cancel it altogether, apply your custom logic |
| 1327 | * and return false. |
| 1328 | * |
| 1329 | * @since 3.9.0 |
| 1330 | * |
| 1331 | * @param boolean $send return false to prevent WP from sending an email |
| 1332 | * @param int $user_id User ID |
| 1333 | * @param string $plaintext_pass Optional. The user's plaintext password |
| 1334 | */ |
| 1335 | if (apply_filters('wp_new_user_notification_user', true, $user_id, $plaintext_pass)) { |
| 1336 | WP_DEBUG ? wp_mail($email, $subject, $message) : @wp_mail($email, $subject, $message); |
| 1337 | } |
1305 | 1338 | } |
1306 | 1339 | endif; |
1307 | 1340 | |