Nats4 Member Logging
-- This article is written for NATS4 and NATS4.1.
-- If you are using NATS4.1, you can also check out our Affiliate Login History wiki article for information on the Login History affiliate page.
Member logging is a feature in NATS4 that allows you to direct NATS to keep a record of all member logins. To use this feature, send a HTTP GET request from your server to the PHP script: member_loginlog.php with your selected site's ID number and the member's username. NATS will add a log entry in that particular member's login history.
For example, you can add the following code to a PHP script and then run it:
These logs are a secure feature in NATS. As a result, the IP address of the server that is requesting information must be in the NATS configuration file $config['SECURE_IPS'] setting.
$config['SECURE_IPS'] = Array('184.108.40.206', '220.127.116.11');
Simply replace "18.104.22.168" in the above example code with your server's IP address.
After this feature is activated, the specified member's login history will show up in the Members Admin's members details.
To find the member's login log, go to the Members Admin, find the member you are tracking, and click the "View Member Details" icon. Scroll down to the bottom of the Member Details page to find the Login Log for your specified member.
If you are allowing members of one (1) site access to other NATS sites, you can specify multiple sites in the siteid parameter. If there are multiple siteids specified, NATS will use those siteids to find a member record match. NATS will record the login to only one (1) Member record. Consider the following:
1) Member A has a membership to site 5. You grant all members of site 5, 64, and 2 access to each other. With the following URL, NATS will locate Member A and record the login.
2) Member A has a membership to sites 5 and 64, as Member B. You grant all members of site 5, 64, and 2 access to each other. With the following URL, NATS will locate either Member A or Member B and record only one (1) login, depending on the first record returned from the database. So, it could be recorded on Member A or Member B, but not both.