How to display extra fields for user
How to display extra fields for user
How to display extra fields for user
How to remember which page the user was on before logout?
You didn’t provide any code so I’ll give you some pseudo code and you make of it what you will: Your HTML button: <a href=”<?php echo $download_url; ?>” class=”download-button<?php echo $is_disabled; ?>”>Download</a> Now, you’re going to want to write some CSS style rules for the following: .download-button{} .download-button.disabled{} Make one look like a bright, vibrant, … Read more
wp_insert_user error
Authentication between two different sites using the WordPress login cookie
How to allow access based on the user meta flag
If you need to get the value of a field in a custom database table you can try using an SQL query. You’ll have to check the column or table name to construct final version of the query. add_action( ‘profile_update’, ‘my_profile_update’, 10, 2 ); function my_profile_update( $user_id, $old_user_data ) { global $wpdb; $status = $wpdb->get_var( … Read more
This question is from 9 months ago and maybe it is solved right now. but I’ll send the answer to help other people who may have this question: You have to install JWT plugin. Then, you have to create Bearer Token by POSTing a username and password to this address: https://example.com/wp-json/jwt-auth/v1/token In postman, you have … Read more
The problem is that wp_get_current_user (which current_user_can relies upon) is pluggable, which means it isn’t loaded until after plugins are loaded (to give plugins a chance to override it). That means it’s not available to call from the top level of a plugin file. Instead, I’d make the role check inside the hook e.g. function … Read more
Send user auto generated password on different email