Ejemplo n.º 1
0
 def POST(self):
     i = web.input("code", "username")
     f = forms.reset_password()
     if not f.validates(i):
         return render.reset_password(f)
     else:
         try:
             web.ctx.site.reset_password(i.username, i.code, i.password)
             web.ctx.site.login(i.username, i.password, False)
             raise web.seeother('/')
         except Exception as e:
             return "Failed to reset password.<br/><br/> Reason: " + str(e)
Ejemplo n.º 2
0
 def GET(self):
     f = forms.reset_password()
     return render.reset_password(f)