Пример #1
0
 def put_pw_recover_email(self, netid, email, edate):
     """
     Updates recover email info in netid's profile
     """
     profile = Profile()
     profile.recover_email = email
     profile.recover_email_date = edate
     return self.put_pw_recover_info(netid, profile)
Пример #2
0
 def _pw_recover_from_json(self, data):
     info = json.loads(data)['profile'][0]
     ret = Profile()
     if 'validid' in info:
         ret.validid = info['validid']
     if 'recover_email' in info:
         ret.recover_email = info['recover_email']
     if 'recover_email_date' in info:
         ret.recover_email_date = info['recover_email_date']
     if 'recover_sms' in info:
         ret.recover_sms = info['recover_sms']
     if 'recover_sms_date' in info:
         ret.recover_sms_date = info['recover_sms_date']
     if 'recover_block_code' in info:
         ret.recover_block_code = info['recover_block_code']
     return ret