def delete_user(user_id=undefined, ): User.delete_user(user_id) users = DBSession.execute(select([ t_users.c.id, ])).fetchall() return users
def delete_user(request): """delete a user completely""" user_id = int(request.matchdict["user_id"]) """if asbool(get_settings().get("enable_user_authentication", False)): # ensure that the user exists and we have the permission to update it may_delete = request.has_perm(perm_global_delete_user) or request.has_perm(perm_own_delete_user) and request.user.id == user_id if not may_delete: raise APIError(403, "forbidden", "You may not delete this user.")""" User.delete_user(user_id) return {"status": "OK"}