AAA, NAC, Guest Access & BYOD

How to block Guest users from registering an account by specifying own email as sponsor email

by ‎05-12-2016 07:22 PM - edited ‎05-12-2016 07:22 PM
Requirement:

Clearpass Guest Self Registration setup



Solution:

By using the Ajax Submit feature in Clearpass Guest, we can validate user entered data for email, sponsor email field and show an alert to enter a valid sponsor email address.



Configuration:

Steps:

Edit the self registration -> Register Page -> Forms -> Submit field.

Enabled the option to show advanced properties.

Enter the text 'RegisterSubmit' in AJAX Submit field and save changes.

Edit the self registration -> Register Page -> Footer HTML, enter the following script and save changes.

 

<script>
{literal}
var fieldName1 ="sponsor_email";
var fieldName2 ="email";
function RegisterSubmit(form_name) {

var sponsor_email = document.forms[form_name][fieldName1].value;
var email = document.forms[form_name][fieldName2].value;
   
   if (sponsor_email == email ) {
   declareInvalid(form_name, 'Please enter a valid sponsor email');
   return false;
}{
    return true; // Proceed to regular
}

function declareInvalid(form_name, ruleBroken) {
  alert("not a valid sponsor email: " + ruleBroken);
  var tidField = document.forms[form_name][fieldName1];
  tidField.style.border = "2px solid red";
}
}
{/literal}
</script>

 

 

 



Verification

Perform a test self registration by entering same email and sponsor email to test the alert:

 

 

Search Airheads
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.