def __init__(self, username, password, usertype, credits): self.username = username #self.email = email self.password = bcrypt.generate_password_hash(password).decode('utf-8') #self.confirmed_email = False #self.confirmed_email_on = None #self.confirmed_phone = False #self.confirmed_phone_on = None self.usertype = usertype self.credits = credits
def update(self, username, email, password, phone): if (username): self.username = username if (email): self.email = email if (phone): self.phone = phone if (password): self.password = bcrypt.generate_password_hash(password).decode( 'utf-8') db.session.commit()
def __init__(self, username, password): self.username = username #self.email = email self.password = bcrypt.generate_password_hash(password).decode('utf-8')
def updatePassword(self, password): if (password): self.password = bcrypt.generate_password_hash(password).decode( 'utf-8') db.session.commit()