Get user by meta key – WP multi site

This is the problem:

$user = reset(
        get_users(

reset expects a reference to an array, and there’s no mechanism for error checking. So even if it finds the user, you’re misusing the return value.

It might be possible to adjust this to use references properly, but references in PHP are something best avoided, and there are better options out there for getting the first item in an array in PHP.

This would work better, and provide a chance to check for error values or empty arrays:

$users = get_users(... );
$user = reset( $users );

This would work even better as it doesn’t modify the array, and it runs in O(1) time so it’s the same cost no matter how large the array gets:

$users = get_users(...);
$user = array_pop(array_reverse($users));

This one also works in PHP 5.4+:

$users = get_users(...);
$user = array_values($users)[0];

All of them, including what you have right now, will require you to do this:

if ( empty( $users ) ) {
    // nothing was found, print an error message and abort
}