def registration_link(cls, Email_user, user_password): check = Master.admin(Email_user) if check["email"] is None: registration = cls(Email_user, utils.hash_password(user_password)) registration.save_to_mongo() return else: return False
def registration(cls, firstname, lastname, email, password, img_user, image): if cls.get_by_email(email) == False: utils.email_is_valid(email) new_user = cls(firstname, lastname, email, utils.hash_password(password), img_user, image) new_user.save_to_mongo() session['email'] = email return True else: return "there is a user with that email"
def registration(cls,name ,lastname,email,password,date,filename): user = cls.get_by_email(email) #mail = utils.hash_email(password) account = activate_account(email) if user is not None: utils.email_is_valid(email) new_user = cls(name,lastname,email,utils.hash_password(password),date,filename) account new_user.save_to_mongo() session['email'] = email return True else: return False
def passhashed(cls, password): if password is not None: return utils.hash_password(password)