I am trying to integrate another script, Questions2Answer, with Processwire user management. The script needs an array with key/value pairs for user->name => user->id
The script provides an array $userids with active user->ids that looks like this var_dumped for a page with two users:
array(2) {
[0]=>
int(1107)
[1]=>
int(41)
}
How can I take $userids, find the corresponding $user->names in Processwire as values and then return that to Q2A as a clean key/value array?
This is probably basic PHP, but I have tried so many variations that I now completely lost the plot. Any pointers appreciated.