Add getGenericUser function
Merge pull request #6754 from lucasmichot/5.0-auth-generic-user

[5.0] Add getGenericUser Function