| 1148 | wp_new_user_notification_admin( $user_id, $plaintext_pass ); |
| 1149 | wp_new_user_notification_user( $user_id, $plaintext_pass ); |
| 1150 | } |
| 1151 | endif; |
| 1152 | |
| 1153 | if ( !function_exists('wp_new_user_notification_user') ) : |
| 1154 | /** |
| 1155 | * Sends password to the new user, normally via email. |
| 1156 | * |
| 1157 | * @since 2.9 |
| 1158 | * |
| 1159 | * @param int $user_id User ID |
| 1160 | * @param string $plaintext_pass Optional. The user's plaintext password |
| 1161 | */ |
| 1162 | function wp_new_user_notification_user($user_id, $plaintext_pass = '') { |
| 1163 | if ( empty($plaintext_pass) ) |
| 1164 | return; |
| 1165 | |
| 1179 | if ( !function_exists('wp_new_user_notification_admin') ) : |
| 1180 | /** |
| 1181 | * Notify the blog admin of a new user, normally via email. |
| 1182 | * |
| 1183 | * @since 2.9 |
| 1184 | * |
| 1185 | * @param int $user_id User ID |
| 1186 | * @param string $plaintext_pass Optional. The user's plaintext password |
| 1187 | */ |
| 1188 | function wp_new_user_notification_admin($user_id, $plaintext_pass = '') { |
| 1189 | $user = new WP_User($user_id); |
| 1190 | |
| 1191 | $user_login = stripslashes($user->user_login); |
| 1192 | $user_email = stripslashes($user->user_email); |
| 1193 | |
| 1194 | $message = sprintf(__('New user registration on your blog %s:'), get_option('blogname')) . "\r\n\r\n"; |
| 1195 | $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; |
| 1196 | $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n"; |
| 1197 | |
| 1198 | @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), get_option('blogname')), $message); |