Notice fixes for user-new.php. Props wpdavis. see #15456
git-svn-id: http://svn.automattic.com/wordpress/trunk@16527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0a1d745a54
commit
f6451774bd
|
@ -15,14 +15,14 @@ if ( ! current_user_can('create_users') && ! current_user_can('promote_users') )
|
||||||
if ( is_multisite() ) {
|
if ( is_multisite() ) {
|
||||||
function admin_created_user_email( $text ) {
|
function admin_created_user_email( $text ) {
|
||||||
/* translators: 1: Site name, 2: site URL, 3: role */
|
/* translators: 1: Site name, 2: site URL, 3: role */
|
||||||
return sprintf( __( "Hi,
|
return sprintf( __( 'Hi,
|
||||||
You've been invited to join '%1$s' at
|
You\'ve been invited to join \'%1$s\' at
|
||||||
%2$s as a %3$s.
|
%2$s as a %3$s.
|
||||||
If you do not want to join this site please ignore
|
If you do not want to join this site please ignore
|
||||||
this email. This invitation will expire in a few days.
|
this email. This invitation will expire in a few days.
|
||||||
|
|
||||||
Please click the following link to activate your user account:
|
Please click the following link to activate your user account:
|
||||||
%%s" ), get_bloginfo('name'), site_url(), esc_html( $_REQUEST[ 'role' ] ) );
|
%%s' ), get_bloginfo('name'), site_url(), esc_html( $_REQUEST[ 'role' ] ) );
|
||||||
}
|
}
|
||||||
add_filter( 'wpmu_signup_user_notification_email', 'admin_created_user_email' );
|
add_filter( 'wpmu_signup_user_notification_email', 'admin_created_user_email' );
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
|
||||||
add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email
|
add_filter( 'wpmu_signup_user_notification', '__return_false' ); // Disable confirmation email
|
||||||
}
|
}
|
||||||
wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) );
|
wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) );
|
||||||
if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {
|
if ( isset( $_POST[ 'adduser' ] ) && isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) {
|
||||||
$key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $_REQUEST[ 'email' ] ) );
|
$key = $wpdb->get_var( $wpdb->prepare( "SELECT activation_key FROM {$wpdb->signups} WHERE user_login = %s AND user_email = %s", $new_user_login, $_REQUEST[ 'email' ] ) );
|
||||||
wpmu_activate_signup( $key );
|
wpmu_activate_signup( $key );
|
||||||
$redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' );
|
$redirect = add_query_arg( array('update' => 'addnoconfirmation'), 'user-new.php' );
|
||||||
|
|
Loading…
Reference in New Issue