예제 #1
0
    def POST(self):
        form = web.input(
            username="",
            password="",
            passcheck="",
            email="",
            emailcheck="",
            day="",
            month="",
            year="",
            recaptcha_challenge_field="",
            g_recaptcha_response=web.input("g-recaptcha-response"))

        if not define.captcha_verify(form):
            return define.errorpage(
                self.user_id,
                "There was an error validating the CAPTCHA response; you should go back and try again."
            )

        login.create(form)
        return define.errorpage(
            self.user_id, "**Success!** Your username has been reserved and a "
            "message has been sent to the email address you specified with "
            "information on how to complete the registration process. You "
            "should receive this email within the next hour.",
            [["Return to the Home Page", "/index"]])
예제 #2
0
def signup_post_(request):
    form = request.web_input(username="",
                             password="",
                             passcheck="",
                             email="",
                             emailcheck="",
                             day="",
                             month="",
                             year="")

    if 'g-recaptcha-response' not in form or not define.captcha_verify(
            form['g-recaptcha-response']):
        return Response(
            define.errorpage(
                request.userid,
                "There was an error validating the CAPTCHA response; you should go back and try again."
            ))

    login.create(form)
    return Response(
        define.errorpage(
            request.userid,
            "**Success!** Your username has been reserved and a message "
            "has been sent to the email address you provided with "
            "information on how to complete the registration process. You "
            "should receive this email within the next hour.",
            [["Return to the Home Page", "/"]]))
예제 #3
0
파일: user.py 프로젝트: Weasyl/weasyl
def signup_post_(request):
    form = request.web_input(
        username="", password="", passcheck="", email="", emailcheck="",
        day="", month="", year="")

    if 'g-recaptcha-response' not in form or not define.captcha_verify(form['g-recaptcha-response']):
        return Response(define.errorpage(
            request.userid,
            "There was an error validating the CAPTCHA response; you should go back and try again."))

    login.create(form)
    return Response(define.errorpage(
        request.userid,
        "**Success!** Your username has been reserved and a message "
        "has been sent to the email address you provided with "
        "information on how to complete the registration process. You "
        "should receive this email within the next hour.",
        [["Return to the Home Page", "/"]]))
예제 #4
0
파일: user.py 프로젝트: 0x15/weasyl
    def POST(self):
        form = web.input(
            username="", password="", passcheck="", email="", emailcheck="",
            day="", month="", year="", recaptcha_challenge_field="", recaptcha_response_field="")

        if not define.captcha_verify(form):
            return define.errorpage(
                self.user_id,
                "The image verification you entered was not correct; you should go back and try again.")

        login.create(form)
        return define.errorpage(
            self.user_id,
            "**Success!** Your username has been reserved and a "
            "message has been sent to the email address you specified with "
            "information on how to complete the registration process. You "
            "should receive this email within the next hour.",
            [["Return to the Home Page", "/index"]])