Example #1
0
    def validate_registration(self, req):
        acctmgr = AccountManager(self.env)
        email = req.args.get('email', '').strip()

        if is_enabled(self.env, EmailVerificationModule) and \
                acctmgr.verify_email:
            if not email:
                raise RegistrationError(
                    N_("You must specify a valid email address."))
            elif email_associated(self.env, email):
                raise RegistrationError(
                    N_("The email address specified is already in use. "
                       "Please specify a different one."))
Example #2
0
    def validate_registration(self, req):
        acctmgr = AccountManager(self.env)
        email = req.args.get('email', '').strip()

        if is_enabled(self.env, EmailVerificationModule) and \
                acctmgr.verify_email:
            if not email:
                raise RegistrationError(N_(
                    "You must specify a valid email address.")
                )
            elif email_associated(self.env, email):
                raise RegistrationError(N_(
                    "The email address specified is already in use. "
                    "Please specify a different one.")
                )
Example #3
0
 def validate_registration(self, req):
     acctmgr = AccountManager(self.env)
     email = req.args.get('email', '').strip()
     if is_enabled(self.env, EmailVerificationModule) and \
             EmailVerificationModule(self.env).verify_email:
         # Initial configuration case.
         if not email and not req.args.get('active'):
             raise RegistrationError(
                 N_("You must specify a valid email address."))
         # User preferences case.
         elif req.path_info == '/prefs' and email == req.session.get(
                 'email'):
             return
         elif email_associated(self.env, email):
             raise RegistrationError(
                 N_("The email address specified is already in use. "
                    "Please specify a different one."))
 def validate_registration(self, req):
     email = req.args.get('email', '').strip()
     if self.env.is_enabled(EmailVerificationModule) and \
             EmailVerificationModule(self.env).verify_email:
         # Initial configuration case.
         if not email and not req.args.get('active'):
             raise RegistrationError(N_(
                 "You must specify a valid email address.")
             )
         # User preferences case.
         elif req.path_info == '/prefs' and \
                         email == req.session.get('email'):
             return
         elif email_associated(self.env, email):
             raise RegistrationError(N_(
                 "The email address specified is already in use. "
                 "Please specify a different one.")
             )