Security

Reply
Occasional Contributor I
Posts: 7
Registered: ‎05-16-2012

Amigopod Self registration page

[ Edited ]

 

I want to change the following parts on the self registration page

 

 

Explanation of the page we want

 

Your Name:

 

User name:

 

Email:

 

Phone Number:

 

Secret Question:

 

Secret Answer:

 

Confirm

 

Register Button

 

 

User Roles created:

 

1 Guest

2 Visitor

3 Employee

 

 

 

Questions:

 

1)      Can we setup a config that is able to look at email and push them into the Role ID we want

                Example:

 

Your Name:

Test

User name:

test123

Email:

test@emoployee.com

Phone Number:

777.666.6666

Secret Question:

My dog

Secret Answer:

My dogs name

Confirm

Check this

Register Button

Push button

 

**Role ID would be hidden, but since email contains employee.com would be placed into User Role employee

 

 

 

2)      How do we assign Expiration of guest wireless access on Role id

  1. User Role: Guest – 1 day expiration
  2. User Role: Visitor – 7 day expiration
  3. User Role: Employee – 365 days

 

Aruba Employee
Posts: 98
Registered: ‎03-15-2011

Re: Amigopod Self registration page

There is no means to do this logic on the server, but you can do pre-POPST tricks on the client side.

 

Edit the submit field for the self-registration form, click Advanced and enter RegisterSubmit under AJAX Submit.

 

Edit the Footer HTML of the registration form and put this script template in place.  This is a simple proof of concept that takes the phone number, strips non-numeric numers, and reverses it to use as the username.  You would need to check the email and set the other fields using your own logic.

 

<script type="text/JavaScript"><!--{literal}
function RegisterSubmit(form_name) {
    var frm = document.forms[form_name];
    var error = '';
    // Checking here...

    if (error != '') {
        alert(error);
        Nwa_EnableFormButtons(form_name);
        return false;
    }

    // Reverse the phone number and put it as the username.
    if (frm.visitor_phone.value != '') {
        var name = '';
        var phone = frm.visitor_phone.value.split('');
        for (var i = 0; i < phone.length; i++) {
            var charCode = phone[i].charCodeAt(0);
            if((charCode > 47) && (charCode <  58)) {
                name = phone[i] + name;
            }
        }
        frm.username.value = name;
    }

    return true; // Proceed to regular
}
//-->
{/literal}</script>

 

Word of caution that someone with strong HTML and scripting prowress can work around this...

 

Search Airheads
Showing results for 
Search instead for 
Did you mean: