Multisite Login Access Restrictions
Multisite Login Access Restrictions
Multisite Login Access Restrictions
This will give the user id of the currently logged in user: $current_user_id = get_current_user_id(); User IDs are assigned sequentially (normally) when a user is created in WP admin (or by a process that creates the user ID programmatically). But be aware that the user ID can be abused. For instance, one could query your … Read more
Remove My Account Menu items in Woocommerce based on user roles
You could do this with a low-priority authenticate filter. I’m surprised there aren’t more appropriate hooks in the login process, but I can’t see one. (There is already an example of a filter like this though: wp_authenticate_spam_check.) If the value the filter is given is a user, that means a previous filter has accepted the … Read more
How to create a User Role and give permission to only use Web Stories plugin?
Some data of one custom user profile is erased when I update another custom user profile
How to allow users to make quizzes or tests in WordPress?
No, WordPress passwords are not stored in plain text. They’re stored as hashes generated by an old version of PHPass, which I think does multiple rounds of salted MD5 hashes. You cannot extract the original password from this, by design. See Why shouldn’t I store passwords in plain text? on Information Security StackExchange. If you … Read more
Well, the AI didn’t do THAT bad of a job. But either you or the AI didn’t deliver code for the functions get_users_who_commented or get_number_of_comments_by_user which are not wordpress functions but have to be coded seperatly. Also, i would change the code a bit to use wordpress-internal functions like the comment query: function my_custom_shortcode( $atts … Read more
Automatically select category based on user role