Security

Reply
Regular Contributor II
Posts: 226
Registered: ‎03-03-2011

Sponsor lookups using sponsor_email needs specific case match

Hi All,

 

I am trying to configure validation of the sponsor_email field for guest self-registration on Amigopod. The validation is successfully taking place against our LDAP server however the problem is our email address is stored in the case sensitive format:

 

Firstname.Lastname@Domain.co.uk

 

If the guest user enters the sponsor email address exactly as above with the correct case the email address validates successfully and the account is created. If the email address is entered as firstname.lastname@domain.co.uk the validation fails.

 

I have checked through the conversions which can be completed against fields but cannot see any way of achieving what I require. 

Does anybody have any suggestions?

 

Thanks


David

David
ACDX #98 | ACMP | ACCP
Contributor I
Posts: 30
Registered: ‎01-04-2012

Re: Sponsor lookups using sponsor_email needs specific case match

Go to Guest Self Registration on Amigopod, and then go to Edit, Click on Define Fields.

 

Under neath that will be the Sponsorship validation section.

 

formvalidation.JPG

Make sure that the Validator Param: is set to sponsor_email, this will check the email before the user hits submit to let them know whether the email is valid or not.

Regular Contributor II
Posts: 226
Registered: ‎03-03-2011

Re: Sponsor lookups using sponsor_email needs specific case match

Thanks for the response although I don't think this is what I require. The issue relates to the fact that the email addresses are stored with a specific case in Active Directory.

I can validate the email address without issue if I specify the exact case but I don't want to have to do that. I would like the Amigopod to change the case of the email address to have a capital letter of the first name and last name and the domain name before the check takes place. Can this be done?

 

Thanks

 

David

David
ACDX #98 | ACMP | ACCP
Aruba Employee
Posts: 98
Registered: ‎03-15-2011

Re: Sponsor lookups using sponsor_email needs specific case match

We can get you partially there.  The GUI does not allow conversions with that level of specificity.  We do support client side scripts to run prior to the form submission.

 

Edit the Register Page Form fields and select submit and Edit.  Under Advanced you will see an option AJAX Submit.  Enter: RegisterSubmit and Save Changes.

 

Return to the edit self-registration map and select the Register Page Footer.  In the Footer HTML textarea we need to define the function that will morph your field.  

 

Note that a scripting language is available on these fields, so any CSS or JavaScript needs to be wrapped in special tags:

{literal} .. {/literal}

The following example was a proof of concept that reversed a phone number, stripping any extraneous characters.

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

In your case you would want to pull in your sponsor_email field, break apart and piece it back together formatted as you need.

 

These may assist in your specific needs:

http://lawrence.ecorp.net/inet/samples/regexp-format.php#cap

http://www.w3schools.com/jsref/jsref_split.asp

http://www.sitepoint.com/forums/showthread.php?706553-Need-to-split-email-address-and-have-two-alert-outputs

 

Contributor I
Posts: 27
Registered: ‎05-13-2010

Re: Sponsor lookups using sponsor_email needs specific case match

Can the sponsor lookup be configured to use RADIUS instead of LDAP? 

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