This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
radiusdesk:login_pages:other_profile [2023/01/25 22:57] admin [User Registration - Other Profile Option] |
radiusdesk:login_pages:other_profile [2023/01/25 23:11] (current) admin [Tweak sConnect.js] |
||
|---|---|---|---|
| Line 6: | Line 6: | ||
| * Make sure you create the other profile and it has all the features you need (e.g. faster bandwidth) | * Make sure you create the other profile and it has all the features you need (e.g. faster bandwidth) | ||
| * You can use the Profile name or Profile ID in the Login Page. | * You can use the Profile name or Profile ID in the Login Page. | ||
| + | |||
| + | ===== Tweak sConnect.js ===== | ||
| + | * In our example we will reward users that register with a phone number that starts with **083** and has a total of 10 digits. | ||
| + | * Edit **/ | ||
| + | * Look for this part: | ||
| + | <code javascript> | ||
| + | / | ||
| + | //=== Proof of Concept Hack === | ||
| + | //=== other_profile_name = ' | ||
| + | var other_profile_name = ' | ||
| + | //var other_profile_id = 56; // | ||
| + | var phone = $("# | ||
| + | if(/ | ||
| + | formData[' | ||
| + | // | ||
| + | } | ||
| + | //=== END Proof of Concept Hack === | ||
| + | */ | ||
| + | </ | ||
| + | * Now for our requirement we change it to the following: | ||
| + | <code javascript> | ||
| + | //=== Proof of Concept Hack === | ||
| + | //=== other_profile_name = ' | ||
| + | var other_profile_name = ' | ||
| + | //var other_profile_id = 56; // | ||
| + | var phone = $("# | ||
| + | if(/ | ||
| + | formData[' | ||
| + | // | ||
| + | } | ||
| + | //=== END Proof of Concept Hack === | ||
| + | </ | ||
| + | * This means that if during registration a match on the phone number requirement is found, the user will be registered with the other profile. | ||
| + | * You can create your own criteria and simply tweak the **sConnect.js** file. | ||
| + | * This feature comes in handy if you want to give certain users special treatment based on the value of one of the supplied fields during user registration. | ||
| + | |||