Forums
Forums / Plugin: WP Approve User / Not Approved User Conditional
(@contempoinc)
6 years, 5 months ago
Hi, was wondering if there’s a simple way to write a conditional for non-approved users? Something like:
if(!user_approved) { // Do Something } else { // Do something else }
Browsing the code found this believe it should do the trick.
if ( ! is_wp_error( $userdata ) && ! get_user_meta( $userdata->ID, 'wp-approve-user', true ) && get_bloginfo( 'admin_email' ) !== $userdata->user_email ) { // Do something } else { // Do something else }
The topic ‘Not Approved User Conditional’ is closed to new replies.