Project: ResetPassword - GetUsers
The project contains a script only, not a form. The project is configured as the initial project of the main project. The script is therefore executed by the UMRA Service, just before the form is created. Goal of the project is to return a variable (%LdapUsers%) that holds a table with all user accounts.
The script of the project establishes a connection with the LDAP Server to perform a query to find user accounts. The accounts are stored in a table variable.

Figure 24: Script action to execute script of project ResetPassword - InitializeVars.
Before the LDAP session is setup, the variables used are initialized. Next, the LDAP session is established.

Figure 25: Script action to setup LDAP session.
In this case, the session is encrypted so all communication between the UMRA software and the LDAP Server is secure. The resulting LDAP session is stored in the LDAP session property output variable %LdapSession%.

Figure 26: Script action to search in Novell eDirectory.
Finally, the actual search is executed. The search uses the established session (variable: %LdapSession%) to communicate with the LDAP Server. The results of the search are stored in table variable %LdapUsers%. Note that the variable contains all of the table data.
In the subtree, specified by %LdapUserTreeDn% (example: ou=UserAccounts,o=Tools4ever), the search operation collects all directory service items of type User (Filter: objectClass=User). For each matching item, e.g. all user accounts, the common name (cn) and the distinguished name is returned. So the final table contains 2 columns. The common name is used to present the end-user a user-friendly name while the distinguished name is used to refer to the actual account.
|