How to use class "suggest-users" in sub wiki w/ global users

I use this snippet for an input looking for users:

{{velocity output="false"}}
#userPicker_import
{{/velocity}}

{{html}}
<input type="text" name="user" value="" class="suggest-users"/>
{{/html}}

This is working very well on main wiki. How to modify this in a sub wiki if all users were global ones?

Regards, Simpel

I was searching for a long time and then posting the question above. Right 2 minutes later I found something to come a step closer:

{{velocity}}
{{html}}
#set ($userPickerParams = {
  'data-userScope': 'LOCAL_AND_GLOBAL'
})
#userPicker(false, $userPickerParams)
{{/html}}
{{/velocity}}

That is finding all users I need. But now I don’t know how to check the request.

The snippet in the first post inside a form could pass the user with:

#set ($userReferenceString = "$!request.user")

But how to do this with the snippet in this post?

Got it. As I inspected the renderend html code of the second snippet I found the solution for the first snippet. The magic happens here:

data-userscope="LOCAL_AND_GLOBAL"

So the snippet I introduced first will work with global and local users this way:

{{velocity output="false"}}
#userPicker_import
{{/velocity}}

{{html}}
<input type="text" name="user" value="" class="suggest-users" data-userscope="LOCAL_AND_GLOBAL"/>
{{/html}}

The others scopes could be found here: https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/FrontendResources/AutoSuggestWidget/#HSuggestUsers
One thing is still missing. In the second snippet I could set the option that only one user can be chosen not multiple. How can I achieve that with the current snippet?

Since you inspected the HTML output of the second snippet, couldn’t you check what’s different when passing true versus false as the first parameter? The documentation says:

The userPicker macro requires two parameters: the first one indicates whether the picker accepts multiple values or not …