Exemple #1
0
    def __init__(self, email, username, full_name = None, plainTextPassword = None, slogan=None, description=None, is_oauth_user = False):
        self.email = email
        self.username = username
        self.full_name = full_name
        if plainTextPassword: #TODO: need to architect better solution to handling pws. Want to enforce reqs here
            self.password = crypt.generate_password_hash(plainTextPassword)

        self.joined_on = datetime.datetime.now()
        self.is_admin = False
        self.has_image = False
        self.slogan = slogan
        self.description = description
        self.is_oauth_user = is_oauth_user
Exemple #2
0
    def __init__(self,
                 email,
                 username,
                 full_name=None,
                 plainTextPassword=None,
                 slogan=None,
                 description=None,
                 is_oauth_user=False):
        self.email = email
        self.username = username
        self.full_name = full_name
        if plainTextPassword:  #TODO: need to architect better solution to handling pws. Want to enforce reqs here
            self.password = crypt.generate_password_hash(plainTextPassword)

        self.joined_on = datetime.datetime.now()
        self.is_admin = False
        self.has_image = False
        self.slogan = slogan
        self.description = description
        self.is_oauth_user = is_oauth_user
Exemple #3
0
 def updatePassword(self, plainTextPassword):
     self.password = crypt.generate_password_hash(plainTextPassword)
     db.session.commit()
Exemple #4
0
 def updatePassword(self,plainTextPassword):
     self.password = crypt.generate_password_hash(plainTextPassword)
     db.session.commit()