Find out if logged in user is not subscriber

<?php
$current_user = wp_get_current_user();
if ( ! user_can( $current_user, "subscriber" ) ) // Check user object has not got subscriber role
    echo 'User is a not Subscriber';
else
    echo 'User is a Subscriber';
?>

Leave a Comment

error code: 523