def _get_user_model():
 custom_model = getattr(settings, setting_name('USER_MODEL'), None)
 if custom_model:
  return module_member(custom_model)
 try:
  from mongoengine.django.mongo_auth.models import get_user_document
  return get_user_document()
 except ImportError:
  return module_member('mongoengine.django.auth.User')

def _get_user_model ( ) : custom_model = getattr ( settings , setting_name ( 'USER_MODEL' ) , None ) if custom_model : return module_member ( custom_model ) try : from mongoengine . django . mongo_auth . models import get_user_document return get_user_document ( ) except ImportError : return module_member ( 'mongoengine.django.auth.User' )
get the user document class user for mongoengine authentication .