Hi mann18,
I’m sorry for delay getting back to you. I’ve just released an updated version of the plugin which includes support for 3 arguments. So you can pass in the user_id, the username, or the email address and the shortcode will check to see if the corresponding user account is banned or not. The shortcode will return empty/false if the userid doesn’t exist or does exist but isn’t banned. If banned, then the banned message will be displayed. You can wrap the do_shortcode in an if statement to handle the output.
<?php if (do_shortcode( '[w3dev-is-user-banned email="[email protected]"]' )) { echo 'banned'; } else { echo 'not banned'; } ?>
<?php if (do_shortcode( '[w3dev-is-user-banned user_id="3"]' )) { echo 'banned'; } else { echo 'not banned'; } ?>
<?php if (do_shortcode( '[w3dev-is-user-banned username="myusername"]' )) { echo 'banned'; } else { echo 'not banned'; } ?>
Let me know if you have any further queries, or problems and ill be happy to help. Many thanks. Matt.