Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author webxmedia

    (@webxmedia)

    HI maan18,

    Many thanks for your message. I will create a shortcode so that you can output the error message on any custom page. Please bear with me whilst as I’ll release this in the next version due out imminently.

    Matt.

    Plugin Author webxmedia

    (@webxmedia)

    Hi maan18,

    I’ve just released an updated version of the plugin which includes a new shortcode section for testing/outputting user data. The following shortcode when used with a valid user_id will check to see if the user is banned, and display the appropriate ban message if they are banned, otherwise null.

    [w3dev-is-user-banned user_id=”0″]

    Let me know how you get on, and if you need anything else.

    Matt.

    Thread Starter designweb

    (@maan18)

    Hi Matt,

    Thank you for your struggle. i place the shortcode in my login page but it’s not working.

    <?php echo do_shortcode( '[w3dev-is-user-banned user_id="0"]' ); ?>

    Thanks

    Plugin Author webxmedia

    (@webxmedia)

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cutom login page’ is closed to new replies.