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.

Two questions: Share users? & Customize ID?

Home Forums Community Forum Two questions: Share users? & Customize ID?

This topic contains 7 replies, has 2 voices. Last updated by  Raam Dev 4 years, 1 month ago.

Topic Author Topic
Posted: Friday Nov 16th, 2012 at 8:08 am #31755

We are running a multisite/network. We are selling one membership @ $50/year, which grants access to certain sections on our site. The way we have it set up now is:

Person tries to access protected page —-> Taken to Membership Options page to pay & create profile —-> Can log in and access protected pages. This is a pretty standard flow as I understand it. But here’s our issue: We would like all paying members to becomes users on two of our sites. It seems that the best way to accomplish this would be some sort of plugin/hack that would take all users created by s2Member on the primary site and automatically duplicate them on the 2nd site. I have found 1 or 2 plugins that sounded like they did that but I couldn’t figure them out. Plus, we aren’t using a default WP user role for our paying members, so that may be conflicting with the ability to duplicate them? Nevertheless, we really do need a way to accomplish this! Any ideas?

My second question: Can we somehow assign a custom ID to all paying members and have some sort of logic that uses the next sequential number for subsequent members?

Example: Person pays for membership —> Is assigned Member ID #000001. Another person pays for membership —> Is assigned Member ID #000002, and so on. I know WP assigns a user ID but they are single digits (1, 2, 3) and we can’t use that for business purposes. I was thinking that maybe we could somehow “force” the number to be their Username. So when someone goes to create a profile, the next sequential number is automatically inserted in their Username field and cannot be edited by the user themselves. Please tell me there’s a way to do this!

List Of Topic Replies

Viewing 7 replies - 1 through 7 (of 7 total)
Author Replies
Author Replies
Posted: Friday Nov 16th, 2012 at 9:43 am #31772

Update to 2nd question – Instead of forcing the number into the Username field…Could we create another field in the Registration Form just for this purpose and force it in there?

Posted: Friday Nov 16th, 2012 at 3:06 pm #31809

No one?

Posted: Friday Nov 16th, 2012 at 7:27 pm #31845
Raam Dev
Username: Raam
Staff Member

Hi Terry,

Duplicating users across two WordPress sites would be delicate process and would require some careful planning and custom PHP coding. If you need such functionality, we recommend posting a job on jobs.wordpress.net to see if you can find a programmer who can help you with such a customization.

Regarding the Membership #: The easiest way to accomplish that would be to create a Custom Registration/Profile Field (Dashboard -› s2Member® -› General Options -› Registration/Profile Fields) called Membership ID, and then customize your Pro-Form template (see Is it possible to modify s2Member® Pro Form templates?) and add some PHP that automatically generates a unique Membership ID and adds that value to the Custom Registration Field.

Then, if you don’t want the user to see that field on the form, you can add a CSS style that simply sets the field to display:none, thereby hiding it from the user.

When the form is submitted, the hidden Membership ID field will contain the unique Membership ID that was generated with some PHP and that value will get saved to the users profile.

Posted: Saturday Nov 17th, 2012 at 2:30 am #31864

Hi Raam,

Thanks for the reply!

You said “…and add some PHP that automatically generates a unique Membership ID and adds that value to the Custom Registration Field”. I’m not that experienced in this area. Could you give me an example code?

Posted: Sunday Nov 18th, 2012 at 11:07 am #31928

We would like to have our system up/running this week, so your help is greatly appreciated!

Posted: Monday Nov 19th, 2012 at 10:14 pm #32044

Please?

Posted: Tuesday Nov 20th, 2012 at 2:57 pm #32129
Raam Dev
Username: Raam
Staff Member

Hi Terry,

Such a customization is outside the scope of the s2Member support (see Support Policy). If you need to hire a programmer to help code this feature, we recommend posting a job on jobs.wordpress.net. You can see an example of you can update an s2Member Custom Registration Field here.

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