User Registration - Other Profile Option
When User Registration is configured on a Login Page you define a Profile and Realm the registered user will be assigned to.
There might however be times that you want to assign the user to a different profile (for whatever reason).
We have added this hidden feature and documented it here.
Create other profile
Tweak sConnect.js
/*
//=== Proof of Concept Hack ===
//=== other_profile_name = 'Dev_Super_Register'
var other_profile_name = 'Dev_Super_Register';
//var other_profile_id = 56; //Alternative
var phone = $("#txtrCell").val();
if(/^072/.test(phone)){
formData['other_profile_name'] = other_profile_name;
//formData['other_profile_id'] = other_profile_id;
}
//=== END Proof of Concept Hack ===
*/
//=== Proof of Concept Hack ===
//=== other_profile_name = 'Dev_Super_Register'
var other_profile_name = 'MTN-Profile';
//var other_profile_id = 56; //Alternative
var phone = $("#txtrCell").val();
if(/^083\d{7}$/.test(phone)){
formData['other_profile_name'] = other_profile_name;
//formData['other_profile_id'] = other_profile_id;
}
//=== 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.