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.

Assigning user role based on form fields?

Home Forums Community Forum Assigning user role based on form fields?

This topic contains 1 reply, has 2 voices. Last updated by  Eduan 3 years, 6 months ago.

Topic Author Topic
Posted: Tuesday Jul 9th, 2013 at 2:49 pm #53191

Is it possible to assign a user to a role based on how an optional field is filled out when registering?

For example, there is an optional text field. If left empty, you are assigned to Role level 0. If you put something in, you are assigned to Role level 1. This would be used to show different page content depending on how the form was filled out.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Thursday Jul 11th, 2013 at 3:44 pm #53312
Eduan
Username: Eduan
Moderator

Hello Kiven,

This isn’t possible by default with s2Member. But you should be able to brew a hack that accomplishes just that.

Perhaps an MU plugin that checks when a registration happens (with a hook or something similar). And when that does happen it checks the custom field’s value, and automatically assigns the correct role.

– Eduan

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.