示例#1
0
 def load_by_email(self, email=None):
     """Load the user denoted by self.email"""
     if email:
         self.email = email
     cur_doc = db.load_user_by_email(self.email)
     if cur_doc:
         self.id = cur_doc['_id']
         self.password = cur_doc['password']
         return True
     else:
         return False
示例#2
0
 def load_by_email(self, email=None):
     """Load the user denoted by self.email"""
     if email:
         self.email = email
     cur_doc = db.load_user_by_email(self.email)
     if cur_doc:
         self.id = cur_doc['_id']
         self.password = cur_doc['password']
         return True
     else:
         return False
示例#3
0
 def check_existence_by_email(email):
     cur_doc = db.load_user_by_email(email)
     return cur_doc != None
示例#4
0
 def check_existence_by_email(email):
     cur_doc = db.load_user_by_email(email)
     return cur_doc != None