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.

Bypass closed registration for current user

Home Forums Community Forum Bypass closed registration for current user

This topic contains 4 replies, has 3 voices. Last updated by  Jason (Lead Developer) 4 years, 10 months ago.

Topic Author Topic
Posted: Thursday Mar 1st, 2012 at 1:16 pm #6908

I am modifying the “Invite Anyone” Buddypress plugin (http://wordpress.org/extend/plugins/invite-anyone/) to allow for it to bypass the closed registration setting of s2member. The idea is that I only want invited members to be able to be able to register for a “free” account.

I have found the section of code (invite-anyone/by-email/by-email.php) (line 1156) which I need to modify but I am unsure what s2member filter or php code I need to implement to allow the current user to access the registration page, overriding closed registration in this once instance, but not for anyone else.

Thoughts?

Sorry if this has been answered before, but search on s2member.com is currently not very useful.

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Friday Mar 2nd, 2012 at 4:42 am #7025

Hi Jason.

You could create a page with a free registration pro-form, and point invitees there. [hilite path]Dashboard -› s2Member® -› PayPal® Pro Forms -› Free Registration Forms[/hilite]

Would that work for you?

Posted: Friday Mar 2nd, 2012 at 11:13 pm #7145

This doesn’t allow me to integrate with Buddypress functionality then, at least if I understand your suggestion.

I’m pretty sure there should be a filter or something similar which will allow someone to access the registration hooks of a closed registration site. Buddypress hijacks the registration process from WordPress but is still looking for this WordPress configuration option that S2member controls while its installed. I know exactly where to implement this filter if someone can shed some light on which one should be used and how it should be used.

Posted: Saturday Mar 3rd, 2012 at 2:47 am #7154

I’ll ask Jason about the hook, but I just remembered the registration access links, which you could send to those users so they can register.
[hilite path]Dashboard -› s2Member® -› PayPal® Buttons -› Registration Access Links[/hilite]

Let me know if that helps. :)

Posted: Tuesday Mar 6th, 2012 at 2:14 am #7398
Staff Member
Jason Hart forum rank/icon upgraded to Experienced User.

I believe you’re looking for this Filter:
ws_plugin__s2member_check_register_access

<?php
add_filter("ws_plugin__s2member_check_register_access", "my_function");
function my_function($users_can_register)
	{
		if($something_allows_a_user_to_register)
			return /* Yes, they can register. */ "1";
			
		else /* Whatever s2Member says already. */
			return $users_can_register;
	}
?>

See Also: s2Member/Options_Forces
See Also: Hooks/Filters in this class package

Viewing 4 replies - 1 through 4 (of 4 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.