Security

last person joined: 17 hours ago 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

Amigopod Self registration page

This thread has been viewed 0 times
  • 1.  Amigopod Self registration page

    Posted May 16, 2012 02:09 PM

     

    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

     



  • 2.  RE: Amigopod Self registration page

    EMPLOYEE
    Posted May 21, 2012 11:15 AM

    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...