latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Disallowing Users to Login

Home Forums Community Forum Unofficial Extensions/Hacks Disallowing Users to Login

This topic contains 1 reply, has 1 voice. Last updated by  Bruce 3 years, 6 months ago.

Topic Author Topic
Posted: Tuesday May 7th, 2013 at 7:41 pm #49409
Bruce
Username: Bruce
Staff Member

If you’re looking to prevent certain Users from logging in, you can use this hack as a guideline. This hack hooks directly into the processes in /wp-login.php, which means it will work for logins from directly at /wp-login.php, and from things like the s2Member Pro Login Widget.

In this hack, we’re redirecting all Users (except Administrators) with the Custom Capability deactivated to the homepage.

ID, 'access_s2member_ccap_deactivated') || current_user_can('administrator'))
		return;
		
	wp_redirect(site_url('/'));
	exit();
}

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Thursday Jun 27th, 2013 at 5:51 pm #52698
Bruce
Username: Bruce
Staff Member
This is now irrelevant

See this plugin to achieve this: http://wordpress.org/plugins/member-approval/

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.