Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 21 lines (15 sloc) 0.459 kB
#!/usr/bin/env python
import argparse
import sys
from access import db
from access.models import User
parser = argparse.ArgumentParser()
parser.add_argument("email", help="Email of user to remove.")
args = parser.parse_args()
user = User.query.filter_by(email=args.email).first()
if not user:
print "User not found"
sys.exit(1)
print "Removing user %s <%s> = %d" % (user.name, user.email, user.key_id)
db.session.delete(user)
db.session.commit()
Jump to Line
Something went wrong with that request. Please try again.