Find matches of a variable in custom usermeta

You can use WP user query.

Assuming that your meta_key is authmeta you can use the following code to find the users with meta key authmeta and value of your $var variable.

$user_query = new WP_User_Query( array( 'meta_key' => 'authmeta', 'meta_value' => $var ) );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)