0

Is there any (easy) way to find out which API users are still active? Or when a user was used the last time?

I just came up with add some logging code in

app/code/core/Mage/Api/Model/Server/Handler/Abstract.php
login()

1 Answer 1

0

I ended up adding some logging code. If someone has a better solution, please share.

+++ b/app/code/core/Mage/Api/Model/User.php
@@ -202,6 +202,8 @@ class Mage_Api_Model_User extends Mage_Core_Model_Abstract
      */
     public function login($username, $apiKey)
     {
+        Mage::log("username: ".$username." apiKey: ".$apiKey,true,"api_active.log");
+        
         $sessId = $this->getSessid();
         if ($this->authenticate($username, $apiKey)) {
             $this->setSessid($sessId);
1
  • Since nobody has a better solution I'll mark my answer as accepted. Feel free to add your suggestion, if its better I'll switch. Thanks.
    – Stefan
    Commented Feb 9, 2017 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.