def block_user(self, user_id):
        user = get_object_or_404(UserProfile, user_ptr=user_id)
        user.blocked = True
        user.save()

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

    # noinspection PyMethodMayBeStatic
Function that changes user status to 'blocked' in the database.
dataset/ETHPy150Open satnet-project/server/services/accounts/models.py/UserProfileManager.block_user