Make WordPress Core

Opened 8 months ago

#59216 new feature request

add a filter on WP_User::get_data_by()

Reported by: stefanxyz's profile stefanxyz Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Users Keywords:
Focuses: Cc:

Description

Hello i speak about this function https://github.com/WordPress/wordpress-develop/blob/6.3/src/wp-includes/class-wp-user.php#L193-L260

function WP_User::get_data_by()

$user = $wpdb->get_row(

$wpdb->prepare(

"SELECT * FROM $wpdb->users WHERE $db_field = %s LIMIT 1",
$value

)

);

It would be cool to filter the query or provide a own query.

Backstory: i run a shop under different domains and want that user can register with the same mail on different domains but in background is the same WP Instance.

Change History (0)

Note: See TracTickets for help on using tickets.