def METHOD_NAME(profile, user):
    """Set the user as the default user for the given profile.
    :param profile: the profile
    :param user: the user
    """
    from aiida.manage.configuration import get_config
    config = get_config()
    profile.default_user_email = user.email
    config.update_profile(profile)
    config.store()