

def get_profile_for_user(user):
    "\n    Returns site-specific profile for this user. Raises\n    ``ProfileNotConfigured`` if ``settings.AUTH_PROFILE_MODULE`` is not\n    set, and ``ImproperlyConfigured`` if the corresponding model can't\n    be found.\n    "
    if (not hasattr(profile, '_mezzanine_profile')):
        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

dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/accounts/__init__.py get_profile_for_user/VarMisuse@17/99 `user`->`profile`