Fix API v2 users resource (issue #3994)