add_user.py more info to store. Email and full name added to db entry
This commit is contained in:
+3
-2
@@ -6,12 +6,13 @@ myclient = pymongo.MongoClient("mongodb://admin:pass@localhost:27017/")
|
||||
username = input("Username: ")
|
||||
password = getpass.getpass("Password: ")
|
||||
uuid = str(uuid.uuid4())
|
||||
|
||||
email = input("Email-adres")
|
||||
full_name = input("Volledige naam")
|
||||
|
||||
mydb = myclient["groclist_db"]
|
||||
mycol = mydb["groclist_users"]
|
||||
|
||||
mydict = {"username": username, "password": password, "groclist_uuid": uuid}
|
||||
mydict = {"username": username, "password": password, "groclist_uuid": uuid, "email": email, "name": full_name}
|
||||
if mycol.find_one({"username": username}):
|
||||
print("Username already exists\n")
|
||||
exit()
|
||||
|
||||
Reference in New Issue
Block a user