Default Domino Login Form allows multiple variants of Username to login:
- Notes Common Name
- Notes Canonical Name
- Notes Abbreviated Name
- Email Address etc.
If administrator wants to restrict usage of email address only, then following customization can be used:
Assuming SSO is configured on Domino Server and Domcfg.nsf is deployed on server, we’ll create a custom login form:
- Open Domcfg.nsf in Domino Designer.
- Create a copy of “$$LoginUserForm” Form and rename it. For e.g. “DEMOLoginUserForm”.
- Open the newly created form and modify the “Username” field as shown below. Change the name of field to “User” in first and last tab of Field Properties.
- Goto the “onChange” Event of “User” field and add following code:
return onSelectEmail()- Goto the “JSHeader” section of Form and add following code (Please update the domain name in code appropriately): function onSelectEmail(){
if(document.getElementById('User').value=="") {
alert("Please enter username first");
document.getElementById('User').focus();
return false;
}
document.getElementById('Username').value=document.getElementById('User').value+"@demo.com";
return true;
}- Add the Domain name in front of User field as shown in image above.
- Add following code as “Pass thru HTML” in the next line after User field:
<input name="Username" id="Username" type="hidden">- The form is ready now !
- Now open Domcfg.nsf in Domino Admin client and set the mapping for this new form:
- That’s all !
Let me know if you face any issues.. I’ll be happy to assist.
No comments:
Post a Comment