Changeset 10941 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-registration.php
- Timestamp:
- 04/30/2021 08:44:23 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions-registration.php
r10928 r10941 213 213 214 214 return $pending_user; 215 } 216 217 /** 218 * Fetches a pending user record from the database by "inbox", ignoring plus addressing. 219 */ 220 function wporg_get_pending_user_by_email_wildcard( $email ) { 221 global $wpdb; 222 223 $email_wildcard = preg_replace( '/[+][^@]+@/i', '+%@', $wpdb->esc_like( $email ) ); // abc+def@ghi => abc+%@ghi 224 $email_base = preg_replace( '/[+][^@]+@/i', '@', $email ); // abc+def@ghi => abc@ghi 225 226 $matching_email = $wpdb->get_var( $sql = $wpdb->prepare( 227 "SELECT `user_email` FROM `{$wpdb->base_prefix}user_pending_registrations` WHERE ( `user_email` = %s OR `user_email` LIKE %s ) LIMIT 1", 228 $email_base, 229 $email_wildcard 230 ) ); 231 232 if ( $matching_email ) { 233 return wporg_get_pending_user( $matching_email ); 234 } 235 236 return false; 215 237 } 216 238
Note: See TracChangeset
for help on using the changeset viewer.