def get_profile_for_user(user):
    if not hasattr(user, '_mezzanine_profile'):
        # Raises ProfileNotConfigured if not bool(AUTH_PROFILE_MODULE)
        profile_model = get_profile_model()
        profile_manager = profile_model._default_manager.using(user._state.db)

        user_field = get_profile_user_fieldname(profile_model, user.__class__)
        profile, created = profile_manager.get_or_create(**{user_field: user})

        profile.user = user
        user._mezzanine_profile = profile

    return user._mezzanine_profile
Returns site-specific profile for this user. Raises
dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/accounts/__init__.py/get_profile_for_user