コード例 #1
0
ファイル: code.py プロジェクト: EdwardBetts/infogami
 def POST(self):
     i = web.input()
     f = forms.forgot_password()
     if not f.validates(i):
         return render.forgot_password(f)
     else:
         from infogami.infobase.client import ClientException
         try:
             delegate.admin_login()
             d = web.ctx.site.get_reset_code(i.email)
         except ClientException, e:
             f.note = str(e)
             web.ctx.headers = []
             return render.forgot_password(f)
         else:
コード例 #2
0
 def POST(self):
     i = web.input()
     f = forms.forgot_password()
     if not f.validates(i):
         return render.forgot_password(f)
     else:
         from infogami.infobase.client import ClientException
         try:
             delegate.admin_login()
             d = web.ctx.site.get_reset_code(i.email)
         except ClientException, e:
             f.note = str(e)
             web.ctx.headers = []
             return render.forgot_password(f)
         else:
コード例 #3
0
ファイル: code.py プロジェクト: paulproteus/infogami
    def POST(self):
        i = web.input()
        f = forms.forgot_password()
        if not f.validates(i):
            return render.forgot_password(f)
        else:
            from infogami.infobase.client import ClientException
            try:
                delegate.admin_login()
                d = web.ctx.site.get_reset_code(i.email)
            except ClientException as e:
                f.note = str(e)
                web.ctx.headers = []
                return render.forgot_password(f)
            else:
                # clear the cookie set by delegate.admin_login
                # Otherwise user will be able to work as admin user.
                web.ctx.headers = []

            msg = render.password_mailer(web.ctx.home, d.username, d.code)
            web.sendmail(config.from_address, i.email, msg.subject.strip(), str(msg))
            return render.passwordsent(i.email)
コード例 #4
0
ファイル: code.py プロジェクト: EdwardBetts/infogami
 def GET(self):
     f = forms.forgot_password()
     return render.forgot_password(f)
コード例 #5
0
 def GET(self):
     f = forms.forgot_password()
     return render.forgot_password(f)