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.

Redirect to email confirmation page

Home Forums Community Forum Redirect to email confirmation page

This topic contains 5 replies, has 2 voices. Last updated by  David Welch 4 years, 11 months ago.

Topic Author Topic
Posted: Saturday Feb 11th, 2012 at 1:59 pm #4819
James Day
Username: jonnywolf

I am using the free version and would like to have the user after registering directed to a page which notifies him/her that they need to check their email for their user name and password.

I looked on the forum and but cannot find the answer.

Is this possible with S2 member?

I love this plugin!!!

Many thanks,

James

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Saturday Feb 11th, 2012 at 3:48 pm #4829
David Welch
Username: dwbiz05

I’m sure there are other options, but this one should work and I love playing with the hooks and filters… lol!

My suggestion would be to add a function to the user_register hook. Something like this should work (not tested)

1. Create a new file (if you don’t have one) in wp-content/mu-plugins/ called s2-hacks.php. You may also need to create the mu-plugins directory.

2. add this to that new s2-hacks.php file:

function dw_reg_confirm($user_id){
	//This is the url of the page you want to show after registration.
	$confirm_page = 'http://yoursite.com/confirm-page';
	
	wp_redirect($confirm_page);
}

add_action('user_register', 'dw_reg_confirm');
//s2member might prefer add_action('ws_plugin__s2member_after_register', 'dw_reg_confirm');

3. Again, I’ve not tested this fully so let me know if you have any issues.

4. You can also do other things with the content of that page by using the $user_id that is passed from wordpress. If you want to see all the variables s2member sends to their action hook, then change $user_id to $vars=array() and before the “}” add die(print_r($vars)); .

May not be the best option but I hope that helps,
Dave

  • This reply was modified 4 years, 11 months ago by  David Welch.
Posted: Sunday Feb 12th, 2012 at 6:11 am #4877
James Day
Username: jonnywolf

Hi David,

Thanks for your reply I get really lost with php. I have created the folder and added the file with my success page. I get this error:

function dw_reg_confirm($user_id){ //This is the url of the page you want to show after registration. $confirm_page = ‘http://sagewebmarketing.co.uk/confirm-page.html’; wp_redirect($confirm_page); } add_action(‘user_register’, ‘dw_reg_confirm’); //s2member might prefer add_action(‘ws_plugin__s2member_after_register’, ‘dw_reg_confirm’);
Warning: Cannot modify header information – headers already sent by (output started at /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-content/mu-plugins/s2-hacks.php:9) in /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-login.php on line 349

Warning: Cannot modify header information – headers already sent by (output started at /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-content/mu-plugins/s2-hacks.php:9) in /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-login.php on line 361

Warning: Cannot modify header information – headers already sent by (output started at /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-content/mu-plugins/s2-hacks.php:9) in /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-includes/pluggable.php on line 866

Many thanks,

James

Posted: Sunday Feb 12th, 2012 at 6:19 am #4878
James Day
Username: jonnywolf

I have also tried changing to add_action(‘ws_plugin__s2member_after_register’, ‘dw_reg_confirm’);

but get this error

function dw_reg_confirm($user_id){ //This is the url of the page you want to show after registration. $confirm_page = ‘http://sagewebmarketing.co.uk/confirm-page.html’; wp_redirect($confirm_page); } add_action(‘ws_plugin__s2member_after_register’, ‘dw_reg_confirm’);
Warning: Cannot modify header information – headers already sent by (output started at /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-content/mu-plugins/s2-hacks.php:10) in /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-login.php on line 349

Warning: Cannot modify header information – headers already sent by (output started at /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-content/mu-plugins/s2-hacks.php:10) in /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-login.php on line 361

Warning: Cannot modify header information – headers already sent by (output started at /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-content/mu-plugins/s2-hacks.php:10) in /home/jamesday/public_html/SAGEWEBMARKETING.CO.UK/wp-includes/pluggable.php on line 866

Cheers,

James

Posted: Sunday Feb 12th, 2012 at 11:34 am #4887
James Day
Username: jonnywolf

Ok problem solved. I paid someone on odesk to do this for me. Thanks for your help..

Posted: Sunday Feb 12th, 2012 at 5:11 pm #4908
David Welch
Username: dwbiz05

Sorry about that. What was the issue?

Dave

EDIT: I had another user with the same issue. I forget to tell people to start and end their php with the php tags. That’s probably why it was printing out instead of running.

  • This reply was modified 4 years, 10 months ago by  David Welch.
Viewing 5 replies - 1 through 5 (of 5 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.