From 84d0512939fbed57e5814dd21ca5d247ec571e99 Mon Sep 17 00:00:00 2001 From: Glitch Date: Tue, 12 Jul 2016 20:02:51 +0000 Subject: [PATCH] Changed user model --- database.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/database.py b/database.py index 7bd76b3..3685789 100644 --- a/database.py +++ b/database.py @@ -26,7 +26,7 @@ class Team(BaseModel): class User(BaseModel): username = CharField(unique=True, index=True) - email = CharField(unique=True, index=True) + email = CharField(index=True) email_confirmed = BooleanField(default=False) email_confirmation_key = CharField() password = CharField(null = True) @@ -37,6 +37,8 @@ class User(BaseModel): first_login = BooleanField(default=True) restricts = TextField(default="") team = ForeignKeyField(Team, related_name="members") + banned = BooleanField(default=False) + password_reset_token = CharField(null = True) def setPassword(self, pw): self.password = bcrypt.hashpw(pw.encode("utf-8"), bcrypt.gensalt())