List all users based on array of domains

You can try below code which return object of matched records with user_email column into wordpress database users table. /* This function will return object of all match user records Function Location : themes/function.php */ function get_domain_user($domains){ global $wpdb; //Build query for match records selection using RLIKE $strdomain = ”; foreach( $domains as $domain ) … Read more

I try to add informations to User profile

Hi I have tried your code and it works when you do like below: $user_id = get_current_user_id(); // this will give user id of current loged in user // or try using this to get author ID related to your post, this will give $user_id of post author $temp_post = get_post($post_id); $user_id = $temp_post->post_author; var_dump(get_the_author_meta( … Read more

UserMeta Changes Meta Value for Post ID

I believe your issue is related to getting the correct post object on your single post page. From what I can detect from your question is that $post does not contain the post object which you expect. You must remember, $post is one of those very crappy globals which WordPress uses to store the current … Read more

get_user_by asking for string while string is given

If your code, you use the first argument passed to wp_authenticate_user filter callback. That is a WP_User object, it not a email address and it is not a string. You may be confusing because of the name of the variable, $username, I suggest to change the name to $user, whcih is more appropiate and it … Read more