def deactivate_user(self, user_id):
        user = get_object_or_404(UserProfile, user_ptr=user_id)
        user.is_active = False
        user.save()

        allauth_adapter.get_adapter().send_mail(
            template_prefix='email/email_user_blocked',
            email=user.email,
            context={
                'user_email': user.email,
            }
        )


# noinspection PyAbstractClass
Cancel PilotData
dataset/ETHPy150Open satnet-project/server/services/accounts/models.py/UserProfileManager.deactivate_user--crossover with--dataset/ETHPy150Open saga-project/BigJob/pilot/impl/pilotdata_manager.py/PilotData.cancel