Custom Login For Zen


We have a custom login page. (Right off the documentation ). It works perfectly.

<page xmlns="" title="">
  <loginForm id="loginForm" >
    <text name="CacheUserName" label="User:" />
    <password name="CachePassword" label="Password:" />
    <submit caption="Login" />

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.

ClassMethod GetUserId(tEmail) As %String
&sql(SELECT ID into :tUserId FROM security.users WHERE emailaddress = :tEmail)
quit tUserId

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

  • 0
  • 0
  • 87
  • 0
  • 1


Final Answer : It can't be done how I was doing as we don't have access to any data or routine before we are logged in

Thus possible solutions 

1. I implemented REST. However we need to modify a bit to make it more secure.

2. Can also be done via Delegated Login. 

If anyone ever needs any help. Feel free to ping