compat.py 267 Bytes
Newer Older
1 2
from djoser.conf import settings

3
__all__ = ['settings']
4 5 6 7 8 9 10 11


def get_user_email(user):
    email_field_name = get_user_email_field_name(user)
    return getattr(user, email_field_name, None)


def get_user_email_field_name(user):
12
    return user.get_email_field_name()