1. Home
  2. Logging Signon/Signoff Activity

Logging Signon/Signoff Activity

A little known, but useful, feature within m-Power Sign-on Security Logic is the ability to call database procedures immediately after a user signon and/or immediately before a user signoff. While there are numerous applications for such a utility, perhaps the most popular use is to track user activity.

Here is how to do it:

1. After installing your mrcSignon2.xml and mrcSignon2.html files (more info here), go to Admin -> Edit Data Dictionary Files -> Sign On Configuration within the m-Power interface.

2. Look for the line starting with <callrpg. Replace the”SIGNON” text with the name of your stored procedure. If you would like to call another procedure prior to sign-off, please replace SIGNOFF accordingly. Additionally, replace rpglocal=”0″ with rpglocal=”1″.
Note: The database procedure(s) must exist within the same database schema as the Data Dictionary configured with Sign-on Security. For instance, if you are installing Sign-on Security in data dictionary MRCTEST, the stored procedure you referenced must also exist in the MRCTEST schema.

3. Define what parameters will be passed to your procedure by pasting the following line below the callrpg line: <parms_to_SIGNON value=”sessionId;userId;remoteIp;remoteHost;remotePort;remoteUrl;loginDate;loginTime” /> Be sure to replace SIGNON with the name of your sign-on/off procedure, and choose the proper parameters to be passed from this list. For instance, if you’d like to only pass the current user to your SIGNON procedure use: <parms_to_SIGNON value=”userId” />

4. Now that m-Power knows what procedures to call, we need to create the actual procedure(s) on your database. Since m-Power supports numerous databases and each database’s stored procedure logic differs, we will not cover the exact syntax of procedure creation. However, please keep in mind that the stored procedure must be configured with 2 parameters. The first parameter needs to be a 10 character alpha field (which m-Power will pass the user information), and the second parameter must be a 40 character alpha field (which m-Power will pass the user’s session ID). The parameters must be configured in this order.

5. Once your procedure is created, simply sign-in and verify that the logic programmed in your procedure was called.

Let us know how you utilize this feature by leaving feedback in the Comments section!

Updated on May 12, 2023

Was this article helpful?

Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!
CONTACT SUPPORT