### Plugin “BAN Users” Documentation by “WEBxMedia” v1.0

# “BAN Users”

Created: 04/08/2016
Updated: 13/10/2016
By: Matt Whiteman (WEBxMedia LTD)
Email: support@webxmedia.co.uk

Thank you for purchasing my plugin. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thank you!

## Table of Contents

1. Plugin Information
2. Getting Started
3. Plugin Features
4. How is it Useful
5. Frequently Asked Questions
6. How do I configure the plugin's options?
7. How do I customise the email templates?
8. Help?! I need support

### A) Plugin Information: - top

Firstly, I just wanted to express my thanks to YOU for purchasing a copy of my BAN Users WordPress Plugin. So a HUGE THANK YOU from the WEBxMedia team. If you need any support or advice whilst using this plugin please don't hestitate to contact us (WEBxMedia) either via our Envanto profile https://codecanyon.net/user/webxmedia or simply email us directly at support@webxmedia.co.uk - We're here to help.

This plugin has been developed by WEBxMedia to allow administrators to BAN existing users from logging into their WordPress account. A user can be BANned from the users table or via their profile. Users can also be banned for a set period of time by selecting a future date. Users can of course be unbanned. When banning or unbanning a user the plugin allows you to send a custom notification to the user advising them of the change. There are several configurable options that allow the administrator to control how the BAN will be implemented. Either with a notification or redirection, and always preventing them from logging back in.

We're busy working on a number of new enhancements to this plugin, so be sure to keep the plugin updated as we roll out new updates.

### B) Getting Started: - top

- The first step now that you have purchased and downloaded a copy of the plugin is to install and activate the plugin on your WordPress website.
- I should highlight that this is a WordPress Plugin, so be sure to only install it on a WordPress website. It will not work with any other CMS System.
- TO install the plugin upload the plugin files to the /wp-content/plugins directory.
- Next you will need to active the plugin. To activate the plugin you will need to navigate to the 'Plugins' screen in WordPress and click the Activate link under the title of the BAN Users plugin.
- Once activated you can click on the Settings link which is now shown just below the Plugin's name on the 'Plugins' screen in WordPress.
- The plugin should 'work out of the box' with the small exception that you should review and customise the Email Templates. For more help customising the templates please see the FAQ section below.
- Please review the information below and FAQ section which covers most common Q&As.

### C) Plugin Features: - top

- Capture users' IP/Geodata during login
- Display IP/Geodata in users table
- Send notifications to specified email addresses when user publishes first post
- Prevent users with banned email address from registering
- Prevent users with banned email address from logging in
- Prevent users with banned ip address from registering
- Prevent users with banned ip address from logging in
- Easily manage add/remove/search banned email/ip addresses
- Set preferred date format (i.e. dd-mm-yyyy)
- New email template tag for including ban lift date
- Automatically change user’s Posts status (i.e. to pending) when BANned.
- Force logout when user BANned.
- Set custom logout URL when BANned.
- Set message to display when a BANned user attempts to login.
- If already logged in, display message to user when BANned.
- Send custom email notification to user when banned/unbanned.
- Capture unique reason for banning each user.
- Set duration of BAN using date picker.
- BANned users highlighted in users table with icon/coloured background row.
- Users table shows reason user banned.
- Users table shows date user banned.
- Users table shows date user reinstated.

### D) How is it Useful? - top

- You want to ban malicious users from logging in.
- You want to ban users who have breached terms of use or another policy.
- You want to temporarily control access to admin.
- You want to restrict a registered user from making any changes during development.
- You have a client/user who has an unpaid invoice.
- Ideal solution for moderators who monitor wordpress forums/posts.

### E) Frequently Asked Questions - top

- Q. What does this plugin do?
- A. The BAN User plugin enables WordPress administrators to disable (aka BAN, suspend..) specific user accounts. Banning a user prevents them from being able to login to their WordPress account until an administrator reinstates their access. You can prevent a user from logging in indefinately, or until a specified date. There are a number of configurable options, including sending the user an email notification to inform them they have been banned from the website. There is also an email template for notifying a user when their login access has been reinstated (aka unbanned).
- Q. I simply want the ability to BAN users and prevent them from logging in. What basic options do I need to set?
- A. The plugin by default allows you to BAN and UnBAN user accounts, and to force users to logout when banned. It also comes pre-configured with the email notification templates. Other options are available from the Plugin's option settings.
- Q. When banning or unbanning users I want to send them a custom email notification.
- A. This feature is enabled by default. To customise the emails simply click on the 'Email Templates' tab and then edit the subject titles and email body. There are currently two email templates. The 'BAN user notification template', and the 'UnBAN user notification template'. Both of which have a configurable subject title. If you have enabled the 'Require unique reason for ban' option then you will need to include the tag '%%reason%%' within the body of the 'BAN user notification template'. This tag will then be replaced with the text you enter when banning a user.
- Q. I want to clearly highlight users who have been banned in the users table.
- A. By default banned users are highlighted in the users table by a red circle in the BANned column. Users who have been banned are also highlighted by a red row. You can disable these display options by editing the plugin options (click the Options tab).
- Q. When banning a user, I want to include the reason why they have been banned in their email notification.
- A. To include the reason for banning the user in the notification email, ensure the option 'Require unique reason for ban' has been checked. Also make sure you have included the tag '%%reason%%' within the body of the 'BAN user notification template'. This tag will then be replaced with the text you enter when banning a user.
- Q. When a user has been banned from the site whilst still logged in, I want them to see a message.
- A. To display a message to logged in users when banned, first uncheck the plugin option 'If already logged in when banned, force logout'. This will then reveal another option called 'If already logged in when banned, display message to user'. Make sure this option is checked. A text input will then appear allowing you to set a short message (e.g. You have been banned from the website).
- Q. When a user has been banned from the site whilst still logged in, I want to redirect them to the default WP login page
- A. To automatically log a banned user out and redirect them to the default login page you will need to ensure the plugin's option 'If already logged in when banned, display message to user' has been unchecked. You will then see another option called 'If already logged in when banned, force logout'. Simply check this to enable this feature.
- Q. When a user has been banned from the site whilst still logged in, I want to redirect them to a custom url.
- A. To automatically log a banned user out and redirect them to a custom url you will need to ensure the plugin's option 'If already logged in when banned, display message to user' has been unchecked. You will then see another option called 'If already logged in when banned, force logout'. Simply check this to enable this feature. To then set a custom url instead of redirecting banned users to the login page, click the 'Set custom logout URL' and enter a valid url in the text field that appears.
- Q. When banning a user I want to change all their posts to a different status (i.e. to hide all their published content).
- A. Often the reason for banning a user from your website is they've posted content that breaches the site's policy. The BAN User plugin allows you to change the user's posts to a different status (i.e. draft) when banning them. To enable this feature click the 'Change user's posts statuses when banning user (i.e. to hide posts from showing on blog)' checkbox on the options tab. A dropdown list will then appear allowing you to select the preferred status you wish to use.
- Q. I only want to BAN a user for a week.
- A. The BAN User plugin allows you to specify how long you want to BAN the user for. The date is set using a datepicker which is available on the users table and appears as a calendar icon when hovering over the username. To enable the datepicker you must first ensure the plugin's option 'Allow user to be unbanned automatically when a date is reached.' has been checked.
- Q. I want to BAN a user from logging on during certain hours of the day.
- A. Unfortunately this feature isn't currently available, but in plan for a future release of the plugin.
- Q. I want the system to automatically reinstate users' login access when their banned period has expired.
- A. Once a banned user's banned date has elapsed they will automatically be able to log back in to the system. No administrative action is required.
- Q. I want to customise the BANned and UnBANed email templates.
- A. From the plugin's option's page click on the 'Email Templates' tab. You should then see two sections for each corresponding email template. One for the 'BAN User email notification template' and another for the 'UnBAN User email notification template'. Within each section is the subject title and the message body. Important, please make sure you include the tag %%reason%% within the message body of the ban user template if you've enabled the option 'Require unique reason for ban'.
- Q. I want to ban a user how do I do this?
- A. There are two ways (and places!) in which you can ban a user (i.e. disable their account). Either by accessing the user's Profile page, or using the WordPress admin Users page. To BAN a user from their profile page, simply scroll to the bottom of their profile and tick the Ban User checkbox. To BAN a user from the Users page, navigate to the Users page and then find the corresponding user you wish to BAN. Once found hover your mouse over their username and some text links should appear below their username. To disable their account click the link 'Ban'. After a brief moment the link should change to 'Unban' and depending on the options you've set for the plugin the users row should go red and the BANned column should now display a red circle.
- Q. I want to unban a user how do I do this?
- A. There are two ways (and places!) in which you can unban a user (i.e. reinstate their account). Either by accessing the user's Profile page, or using the WordPress admin Users page. To UnBAN a user from their profile page, simply scroll of the bottom of their profile and untick the Ban User checkbox. To UnBAN a user from the Users page, navigate to the Users page and then find the corresponding user you wish to UnBAN. Once found hover your mouse over their username and some text links should appear below their username. To reinstate their account click the link 'Unban'. After a brief moment the link should change to 'Ban' and depending on the options you've set for the plugin the users row should return to white and the BANned column should now display a green circle.
- Q. I need further assistance, how can I request support?
- A. We're here to help you, so if you have any questions or comments please do get in touch using the contact form on our envato profile page: https://codecanyon.net/user/webxmedia
- Q. Can I request changes or enhancements to the plugin?
- A. We welcome any feedback and are always looking at new ways to enhance our plugins. To get in touch please contact us using our envato profile page: https://codecanyon.net/user/webxmedia

### F) How do I configure the plugin's options? - top

The plugin has a number of options that allow you to control how a user is BANned, as well as how users are notified when their account is either banned or unbanned. To set these options access the WordPress dashboard, ensuring your are logged in with administrative privileges. Then click on Settings. The BAN user link will show in the menu. When you are finished making changes to the options, it's important that you click Save Options.

### G) How do I customise the email templates? - top

From the plugin's option page (which is accessible from the WordPress dashboard -> Settings -> BAN User) you will need to click on the Email Templates tab. From here you can set both the subject title and email body for BAN and UnBAN email notifications. You will need to ensure the 'Send emails to users when banned' option has been set, otherwise no notifications will be sent. Also, include the tag %%reason%% within the body of the BAN User email notification template to display the generic/unique reason for the ban.

### H) Help?! I need support - top

We're here to help you, so if you have any questions, comments or issues using the plugin please do get in touch using the contact form on our envato profile page: https://codecanyon.net/user/webxmedia alternatively you can email us directly at support@webxmedia.co.uk. We'd welcome any feedback (hopefully good!) and are always looking at new ways to enhance our plugins. To get in touch please contact us using our envato profile page: https://codecanyon.net/user/webxmedia

Once again, thank you so much for purchasing this plugin and taking the time to read through this documentation. As I said at the beginning, I'd be glad to help you if you have any questions relating to this plugin. No guarantees, but I'll do my best to assist. If you have a more general question relating to the plugins on CodeCanyon, you might consider visiting the forums and asking your question in the "Item Discussion" section.

Matt Whiteman

Go To Table of Contents