- Timestamp:
- 02/10/2022 09:38:45 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/pr/functions.php
r11255 r11544 103 103 * Find a WordPress.org user by a Github login. 104 104 */ 105 function find_wporg_user_by_github( $github_user ) {105 function find_wporg_user_by_github( $github_user, $what = 'user_login' ) { 106 106 global $wpdb; 107 107 108 if ( ! in_array( $what, [ 'ID', 'user_login' ], true ) ) { 109 return false; 110 } 111 108 112 return $wpdb->get_var( $wpdb->prepare( 109 "SELECT u. user_login113 "SELECT u.{$what} 110 114 FROM wporg_github_users g 111 115 JOIN {$wpdb->users} u ON g.user_id = u.ID
Note: See TracChangeset
for help on using the changeset viewer.