{"id":1469,"date":"2012-06-08T14:46:53","date_gmt":"2012-06-08T20:46:53","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/techblog\/?p=1469"},"modified":"2023-05-12T13:23:40","modified_gmt":"2023-05-12T19:23:40","slug":"loging-signonsignoff-activity","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/techblog\/?ht_kb=loging-signonsignoff-activity","title":{"rendered":"Logging Signon\/Signoff Activity"},"content":{"rendered":"<p>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.<\/p>\n<p>Here is how to do it:<\/p>\n<p>1. After installing your mrcSignon2.xml and mrcSignon2.html files (more info <a title=\"Configuring Sign-on Security\" href=\"https:\/\/www.mrc-productivity.com\/docs\/security\/implementing-security\" target=\"_blank\" rel=\"noopener\">here<\/a>), go to Admin -&gt; Edit Data Dictionary Files -&gt; Sign On Configuration within the m-Power interface.<\/p>\n<p>2. Look for the line starting with &lt;callrpg. Replace the&#8221;SIGNON&#8221; 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=&#8221;0&#8243; with rpglocal=&#8221;1&#8243;.<br \/>\n<strong>Note: <\/strong>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.<\/p>\n<p>3. Define what parameters will be passed to your procedure by pasting the following line below the callrpg line:  &lt;parms_to_SIGNON value=&#8221;sessionId;userId;remoteIp;remoteHost;remotePort;remoteUrl;loginDate;loginTime&#8221; \/&gt;   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&#8217;d like to only pass the current user to your SIGNON procedure use:  &lt;parms_to_SIGNON value=&#8221;userId&#8221; \/&gt;<\/p>\n<p>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&#8217;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&#8217;s session ID). The parameters must be configured in this order.<\/p>\n<p>5. Once your procedure is created, simply sign-in and verify that the logic programmed in your procedure was called.<\/p>\n<p>Let us know how you utilize this feature by leaving feedback in the Comments section!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;<\/p>\n","protected":false},"author":3,"comment_status":"closed","ping_status":"open","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[],"ht-kb-tag":[],"class_list":["post-1469","ht_kb","type-ht_kb","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/1469","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1469"}],"version-history":[{"count":6,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/1469\/revisions"}],"predecessor-version":[{"id":11720,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=\/wp\/v2\/ht-kb\/1469\/revisions\/11720"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1469"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-category&post=1469"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/techblog\/index.php?rest_route=%2Fwp%2Fv2%2Fht-kb-tag&post=1469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}