Ticket #25779: 25779.2.patch
| File 25779.2.patch, 2.3 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/includes/ms.php
756 756 $super_admins = get_site_option( 'site_admins', array( 'admin' ) ); 757 757 758 758 $user = get_userdata( $user_id ); 759 if ( $user && $user->user_email != get_site_option( 'admin_email') ) {759 if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) { 760 760 if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) { 761 761 unset( $super_admins[$key] ); 762 762 update_site_option( 'site_admins', $super_admins ); -
src/wp-includes/pluggable.php
1137 1137 $post = get_post($comment->comment_post_ID); 1138 1138 $user = get_userdata( $post->post_author ); 1139 1139 // Send to the administration and to the post author if the author can modify the comment. 1140 $emails = array( get_option('admin_email') ); 1141 if ( user_can($user->ID, 'edit_comment', $comment_id) && !empty($user->user_email) && ( get_option('admin_email') != $user->user_email) ) 1142 $emails[] = $user->user_email; 1140 $emails = array( get_option( 'admin_email' ) ); 1141 if ( user_can( $user->ID, 'edit_comment', $comment_id ) && ! empty( $user->user_email ) ) { 1142 if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) 1143 $emails[] = $user->user_email; 1144 } 1143 1145 1144 1146 $comment_author_domain = @gethostbyaddr($comment->comment_author_IP); 1145 1147 $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'"); … … 1213 1215 function wp_password_change_notification(&$user) { 1214 1216 // send a copy of password change notification to the admin 1215 1217 // but check to see if it's the admin whose password we're changing, and skip this 1216 if ( $user->user_email != get_option('admin_email') ) {1218 if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) { 1217 1219 $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n"; 1218 1220 // The blogname option is escaped with esc_html on the way into the database in sanitize_option 1219 1221 // we want to reverse this for the plain text arena of emails.