@JugurthaK opened this Issue on March 23rd 2020

Hello guys,

Hope you're well !

I would like to "disable" a user after a long time without connection. I know it's not possible to "disable" a user, but I will get his id and revoke his permissions.

But, in the UsersManager.getUsers(UserLogins) method, you have the registered date, but not the last visit, and this function only returns 100 users, i've like 400 users. Is there a way to get the last visit and setup a limit or an offset ?

Thank you,

@sgiehl commented on March 23rd 2020 Member

The default API limit is 100. You can add a filter_limit=-1 to the request to disable the limit.

@sgiehl commented on March 23rd 2020 Member

And afaik there is currently no value stored in the database when a user was last seen.

@JugurthaK commented on March 23rd 2020

Thank you for your help.

Can you tell me how is the "Last seen" column (in the UsersManager UI) computed please ?

@sgiehl commented on March 23rd 2020 Member

It's stored as option value in the options table. So no field that could be accessed directly.
Maybe try using the API method getUsersPlusRole, that should return the last_seen value (for users that have ever logged in)

@tsteur commented on March 23rd 2020 Member

@JugurthaK fyi closing this question now as we're usually not answering questions here. If you have further questions, be great if you could ask this in our forum: https://forum.matomo.org/ There is also a category for Platform and plugin development where these questions can be asked.

This Issue was closed on March 23rd 2020
Powered by GitHub Issue Mirror