We have a custom login page. (Right off the documentation ). It works perfectly.
<page xmlns="http://www.intersystems.com/zen" title=""> <loginForm id="loginForm" > <text name="CacheUserName" label="User:" /> <password name="CachePassword" label="Password:" /> <submit caption="Login" /> </loginForm> </page>
Issue is that we want users to login from the email id that has been saved when we defined the users on the Security. Users page on mgmt portal and not from the userid assigned to them.
What we had thought is to fetch the emailid from the form.
Run a method on submit to fetch userid from the email given and set the returned value as CacheUserName and submit.
&sql(SELECT ID into :tUserId FROM security.users WHERE emailaddress = :tEmail)
This theory doesn't work as we are not yet logged in and we don't have access to the database to run this query.
Any suggestions would help