PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Custom registration form

s2Member Plugin. A Membership plugin for WordPress®.

Custom registration form

Postby geekz » September 23rd, 2010, 2:23 pm

I already have a custom registration page.
I want to create another form for registration of paid members and only after successful paypal transaction they can see this registration page.

Still Unresolved Problem :



Requirements :

1. There will be two registration forms.


2. First registration form is for free members and can be accessed by anyone.


3. Second registration form is for paid members and can be accessed only after making the payment through the paypal generated button.




Question
I am unable to make the second type of registration form.
I want the users to reach the registration page or be able to see the registration page only after they make payment for the membership using the paypal button. Is there a way to do this???
User avatar
geekz
Registered User
Registered User
 
Posts: 7
Joined: September 9, 2010

Re: Custom registration form

Postby geekz » September 25th, 2010, 3:24 am

Finally, i got the solution..
I dug into the codes and found the best solution.


Here is the code to check if the user has made payment or not. If paid, it will set role of Leve 4 , else Level 1.

If anyone wants complete register page code, just let me know. i can help you.
Thanks a lot S2 member Team. You folks made it easier. Thanks a lot.

Code: Select all
$myuser_id = wp_create_user( $uname, $password, $remail );
if($myuser_id){
$new_user = new WP_User($myuser_id);
if(ws_plugin__s2member_check_register_access()){$new_user->set_role("s2member_level4");
echo 'You have successfully registered as Paid member :)'; }
else{$new_user->set_role("s2member_level1");
echo 'You have successfully registered as Free Member.. :)';
}
}

User avatar
geekz
Registered User
Registered User
 
Posts: 7
Joined: September 9, 2010

Re: Custom registration form

Postby adrianlee » February 27th, 2011, 3:51 am

Hi Geekz,
can you tell where this code should go and in which file?
Also should there be one registration page or another one for paid members?

Would really appreciate your help. My membership is almost ready except for this.
User avatar
adrianlee
Registered User
Registered User
 
Posts: 1
Joined: February 26, 2011
Location: Malaysia


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 10 guests

cron