Adapt to custom user supporting way to get the user class

For someone who didn't define a custom user, the end result will
remain the same. For someone who did define one, the custom user is
called.