Add optional user ID parameter for getUseFolder

@karlitschek Backwards compatible - I would like to see this backported to stable6 and stable7

cc @tomneedham @icewind1991