AnsweredAssumed Answered

Retrieving admin user last login via API

Question asked by Richard Crawford on Apr 19, 2018
Latest reply on Apr 20, 2018 by Richard Crawford

I'm working on a PHP script that will retrieve the last_login value for an admin user. Here is the endpoint that I am using:

 

/api/v1/accounts/1/users?search_term=$login_id&include[]=last_login

The problem is that when we execute this, we sometimes get TWO user objects. For example:

 

/api/v1/accounts/1/users?search_term=someone@somewhere.com&include[]=last_login

returns two admin accounts, one with the someone@somewhere.com login id, and one with a totally different login id, and the value of last_login is entirely different for each of them. Why could this be happening?

Outcomes