def reset_pass_and_email(self, new_password, confirm_password, email,
                          supplied_kit_id):
     tl = text_locale['handlers']
     ag_data.ag_update_kit_password(supplied_kit_id, new_password)
     MESSAGE = tl['CHANGE_PASS_BODY'] % supplied_kit_id
     try:
         send_email(MESSAGE, tl['CHANGE_PASS_SUBJECT'], email)
         self.render('change_password.html', email='',
                     skid=self.current_user,
                     new_password='', confirm_password='', result=4,
                     message='')
     except BaseException:
         self.render('change_password.html', email='',
                     skid=self.current_user,
                     new_password='', confirm_password='', result=5,
                     message='')
Example #2
0
 def reset_pass_and_email(self, new_password, confirm_password, email,
                          supplied_kit_id):
     tl = text_locale['handlers']
     ag_data.ag_update_kit_password(supplied_kit_id, new_password)
     MESSAGE = tl['CHANGE_PASS_BODY'] % supplied_kit_id
     try:
         send_email(MESSAGE, tl['CHANGE_PASS_SUBJECT'], email)
         self.render('change_password.html', email='',
                     skid=self.current_user,
                     new_password='', confirm_password='', result=4,
                     message='')
     except:
         self.render('change_password.html', email='',
                     skid=self.current_user,
                     new_password='', confirm_password='', result=5,
                     message='')
 def reset_pass_and_email(self, new_password, confirm_password, email,
                          supplied_kit_id):
     ag_data.ag_update_kit_password(supplied_kit_id, new_password)
     latlongs = ag_data.getMapMarkers()
     tl = text_locale['handlers']
     MESSAGE = tl['CHANGE_PASS_BODY'] % supplied_kit_id
     try:
         send_email(MESSAGE, tl['CHANGE_PASS_SUBJECT'], email)
         self.render('change_pass_verify.html', email='', kitid='',
                     passocde='', new_password='',
                     confirm_password='', result=4, message='',
                     latlongs_db=latlongs, loginerror='')
     except:
         self.render('change_pass_verify.html', email='', kitid='',
                     passocde='', new_password='',
                     confirm_password='', result=5, message='',
                     latlongs_db=latlongs, loginerror='')
 def reset_pass_and_email(self, new_password, confirm_password, email,
                          supplied_kit_id):
     ag_data.ag_update_kit_password(supplied_kit_id, new_password)
     kit_counts = ag_data.getMapMarkers()
     tl = text_locale['handlers']
     MESSAGE = tl['CHANGE_PASS_BODY'] % supplied_kit_id
     try:
         send_email(MESSAGE, tl['CHANGE_PASS_SUBJECT'], email)
         # result=4 is for showing message in if statement of
         # change_pass_verify.html
         self.render('change_pass_verify.html', email='', kitid='',
                     passocde='', new_password='',
                     confirm_password='', result=4, message='',
                     kit_counts=kit_counts, loginerror='')
     except:
         # result=5 is for showing message in if statement of
         # change_pass_verify.html
         self.render('change_pass_verify.html', email='', kitid='',
                     passocde='', new_password='',
                     confirm_password='', result=5, message='',
                     kit_counts=kit_counts, loginerror='')
 def reset_pass_and_email(self, new_password, confirm_password, email,
                          supplied_kit_id):
     ag_data.ag_update_kit_password(supplied_kit_id, new_password)
     kit_counts = ag_data.getMapMarkers()
     tl = text_locale['handlers']
     MESSAGE = tl['CHANGE_PASS_BODY'] % supplied_kit_id
     try:
         send_email(MESSAGE, tl['CHANGE_PASS_SUBJECT'], email)
         # result=4 is for showing message in if statement of
         # change_pass_verify.html
         self.render('change_pass_verify.html', email='', kitid='',
                     passocde='', new_password='',
                     confirm_password='', result=4, message='',
                     kit_counts=kit_counts, loginerror='')
     except BaseException:
         # result=5 is for showing message in if statement of
         # change_pass_verify.html
         self.render('change_pass_verify.html', email='', kitid='',
                     passocde='', new_password='',
                     confirm_password='', result=5, message='',
                     kit_counts=kit_counts, loginerror='')