wp_new_user_notification [ WordPress Function ]
wp_new_user_notification ( $user_id, $plaintext_pass = '' )
| Parameters: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_new_blog_notification, wpmu_signup_user_notification, wpmu_welcome_user_notification, newuser_notify_siteadmin, wpmu_welcome_notification
Notify the blog admin of a new user, normally via email.
Source
<?php
function wp_new_user_notification($user_id, $plaintext_pass = '') {
$user = new WP_User($user_id);
$user_login = stripslashes($user->user_login);
$user_email = stripslashes($user->user_email);
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
// we want to reverse this for the plain text arena of emails.
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
$message = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
$message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n";
@wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);
if ( empty($plaintext_pass) )
return;
$message = sprintf(__('Username: %s'), $user_login) . "\r\n";
$message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
$message .= wp_login_url() . "\r\n";
wp_mail($user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/wp new user notification « WordPress Codex
Description. Notify the blog admin of a new user, normally via email and also send an email with login/password to the new user. This function can be replaced ...
codex.wordpress.org - WordPress › Support » Tags — wp_new_user_notification
Register · WordPress › Support » wp_new_user_notification ... Fatal error: Cannot redeclare wp_new_user_notification(), 5, azureardee, 1 year. New User E- ...
wordpress.org - registration - why is wp_new_user_notification not working ...
Nov 18, 2011 ... i dont like to use a plugin so i made use of user registration custom signup page and its not sending any emails:( at first everything is working ...
wordpress.stackexchange.com - Customizing the new user email with a pluggable function « Steve ...
Jul 10, 2009 ... The function to override for customizing new user emails is wp_new_user_notification() , but the process for overriding any of these pluggable ...
sltaylor.co.uk
Kullanýcý Tartýþmalarý [ wordpress.org ]
- azureardee on "Fatal error: Cannot redeclare wp_new_user_notification()"
- SFC on "Fatal error: Cannot redeclare wp_new_user_notification()"
- Alex Cragg on "Fatal error: Cannot redeclare wp_new_user_notification()"
- SFC on "Fatal error: Cannot redeclare wp_new_user_notification()"
- SFC on "Fatal error: Cannot redeclare wp_new_user_notification()"
- philip@pennypress.co.uk on "New User E-Mail"
- F J Kaiser on "Feature Request(?): Wordpress Core"
- Otto on "Feature Request(?): Wordpress Core"
- F J Kaiser on "Feature Request(?): Wordpress Core"
- Ipstenu on "Feature Request(?): Wordpress Core"