Users set passwords but cannot login
Users set passwords but cannot login
Users set passwords but cannot login
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
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
Deleting anonymous wp_users function not working?
Use the function current_user_can( $capability ). Where $capabilty applies. For example: If ( current_user_can( ‘update_plugins’ ){ //do some update plugin stuff }
Access level seems to have gone from admin to editor
You really should rename your field names with a hyphen (-) instead of an underscore. There is no solution for that other than replacing the underscores (_) for the hyphens (-) I read somewhere that the problem is with the new php naming conventions and when used in functions, it separates the words when an … Read more
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
How to bulk change user role to “No role for this site”
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