Background
See also T324603#8584676.
We should sort the returned IPs by timestamp, since we want the most recent IP addresses wherever we hit a limit. If the actor has very many rows, this could lead to a slow query (there's no index on cuc_actor, cuc_timestamp, so a sort will probably have to be performed).
However, in 90 days hopefully an actor won't accumulate that many rows. We can also monitor API performance: T328892: Monitor the performance of TemporaryAccountHandler APIs.
Acceptance criteria
- IP addresses returned for a given temporary account are sorted by timestamp (most recent first)
Testing Notes
- You can tweak the code(For debugging purposes only and should be removed from the final code.!!) to return all the timestamps for each IP address, you can modify the code to include the timestamps in the result set and then return that result set in the 'getData' function. e.g : 'timestamp' => $row->cuc_timestamp ;
- Visiting this URL : http://localhost:8080/w/rest.php/checkuser/v0/temporaryaccount/{nameoftemporaryaccount} should show ordered ip's by timestamp.