Explicitely pass the array, don't abuse global scope

Signed-off-by: Suki <suki@missallsunday.com>
Also pass the current user ID

Signed-off-by: Suki <suki@missallsunday.com>
Merge pull request #1921 from MissAllSunday/stuff

Explicitely pass the array, don't abuse global scope