Changeset 20682 for trunk/wp-mail.php
- Timestamp:
- 05/02/2012 01:32:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-mail.php
r19712 r20682 106 106 // Set the author using the email address (From or Reply-To, the last used) 107 107 // otherwise use the site admin 108 if ( preg_match('/(From|Reply-To): /', $line) ){108 if ( ! $author_found && preg_match( '/^(From|Reply-To): /', $line ) ) { 109 109 if ( preg_match('|[a-z0-9_.-]+@[a-z0-9_.-]+(?!.*<)|i', $line, $matches) ) 110 110 $author = $matches[0]; … … 115 115 echo '<p>' . sprintf(__('Author is %s'), $author) . '</p>'; 116 116 $userdata = get_user_by('email', $author); 117 if ( empty($userdata) ) { 118 $author_found = false; 119 } else { 117 if ( ! empty( $userdata ) ) { 120 118 $post_author = $userdata->ID; 121 119 $author_found = true; 122 120 } 123 } else {124 $author_found = false;125 121 } 126 122 }
Note: See TracChangeset
for help on using the changeset viewer.