Uploading fix to trunk 1031. please let me know if this works for you.

On Jun 11, 3:22 pm, mdipierro <[email protected]> wrote:
> oops. You are right. Somehow I deleted that line.
>
> Massimo
>
> On Jun 11, 2:59 pm, "mr.freeze" <[email protected]> wrote:
>
> > Then I think it is a bug in tools.py/verify_email line 864. The
> > registration_key is not updated when registration_requires_approval is
> > false:
>
> > def verify_email(
> >         self,
> >         next=DEFAULT,
> >         onaccept=DEFAULT,
> >         log=DEFAULT,
> >         ):
> >         """
> >         action user to verify the registration email, XXXXXXXXXXXXXXXX
> >         """
>
> >         key = self.environment.request.args[-1]
> >         user = self.settings.table_user
> >         users = self.db(user.registration_key == key).select()
> >         if not users:
> >             raise HTTP(404)
> >         user = users[0]
> >         if self.settings.registration_requires_approval:
> >             user.update_record(registration_key='pending')
> >             self.environment.session.flash =
> > self.messages.registration_pending
> >         else:
> >             self.environment.session.flash =
> > self.messages.email_verified #864
> >         if log == DEFAULT:
> >             log = self.messages.verify_email_log
> >         if next == DEFAULT:
> >             next = self.settings.verify_email_next
> >         if onaccept == DEFAULT:
> >             onaccept = self.settings.verify_email_onaccept
> >         if log:
> >             self.log_event(log % user)
> >         if onaccept:
> >             onaccept(user)
> >         redirect(next)
>
> > On Jun 11, 2:30 pm, mdipierro <[email protected]> wrote:
>
> > > It is supposed to delete everything in registration_key
>
> > > On Jun 11, 11:38 am, "mr.freeze" <[email protected]> wrote:
>
> > > > Same result.  What is supposed to happen in the auth_user table when
> > > > email is verified?
>
> > > > On Jun 11, 11:18 am, mdipierro <[email protected]> wrote:
>
> > > > > Could you try uncommenting.
>
> > > > > auth.settings.registration_requires_approval = False
>
> > > > > On Jun 11, 11:07 am, "mr.freeze" <[email protected]> wrote:
>
> > > > > > Even after a user's email is verified and they get the 'Email
> > > > > > Verified' in response.flash, I get 'Registration needs verification'
> > > > > > when trying to log in as that user.  What am I doing wrong?  Here's 
> > > > > > my
> > > > > > auth settings in db.py:
>
> > > > > > from gluon.tools import *
> > > > > > auth=Auth(globals(),db)            # authentication/authorization
> > > > > > auth.define_tables()               # creates all needed tables
> > > > > > crud=Crud(globals(),db)            # for CRUD helpers using auth
> > > > > > service=Service(globals())         # for json, xml, jsonrpc, xmlrpc,
> > > > > > amfrpc
>
> > > > > > ## uncomment as necessary or consult docs for more options
> > > > > > crud.settings.auth=auth           # (optional) enforces 
> > > > > > authorization
> > > > > > on crud
> > > > > > mail=Mail()                                  # mailer
> > > > > > mail.settings.server='localhost:25'    # your SMTP server
> > > > > > mail.settings.sender='[email protected]'         # your email
> > > > > > mail.settings.login='xxxxx:xxxxx'      # your credentials
> > > > > > auth.settings.mailer=mail         # for user email verification
> > > > > > auth.settings.registration_requires_verification = True
> > > > > > #auth.settings.registration_requires_approval = False
> > > > > > auth.messages.verify_email = \
> > > > > >   'Click on the 
> > > > > > linkhttp://localhost:8000/authtest/default/user/verify_email/%(key)s
> > > > > > to verify your email'
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to