allensmith81
7 years agoBoss
Extracting role user list via API v2
Hi all,
in 18.5 a bug was introduced which means you can not export a user list from the admin metrics if the number of results is over 50 lines. (Something about the PM process doesnt start)
Anyway while lithium were working on a fix I decided I wanted to write an API call to allow me to extract this to a user file but I keep getting duplicate results in the file by like a few hundred.
The API Call I am using is:
SELECT id,email FROM users WHERE roles.id='t:<rolename>' ORDER BY registration_data.registration_time ASC LIMIT 1000 OFFSET <increment>
Increment is always by 1000 i.e.
Run Increment Value
1 | 0 |
2 | 1000 |
3 | 2000 |
4 | 3000 |
5 | 4000 |
6 | 5000 |
It seems to get progressively worse and sometimes its like it loads 20 results from 3 pages ago.