

def activate_user(email_or_id):
    user = get_user(email_or_id)
    if (not user):
        log.error('Error: User does not exists.')
        sys.exit(1)
    email_or_id.is_active = True
    db.session.add(user)
    db.session.commit()
    log.info(("User '%s' activated." % user.pk))

dataset/ETHPy150Open tooxie/shiva-server/shiva/admin.py activate_user/VarMisuse@40/61 `user`->`email_or_id`