def put_pw_recover_sms(self, netid, sms, sdate): """ Updates recover sms info in netid's profile """ profile = Profile() profile.recover_sms = sms profile.recover_sms_date = sdate return self.put_pw_recover_info(netid, profile)
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