This is all new stuff I am still working on. I have a patch from you Fran and I will review is asap.
Massimo On May 1, 4:55 pm, Fran <[email protected]> wrote: > On May 1, 10:32 pm, Fran <[email protected]> wrote: > > > tools.py r721 line 724 > > elif self.settings.block_registration: > > session.flash = self.messages.registration_pending > > else: > > session.flash = self.messages.registration_successful > > log = self.settings.register_log > > etc > > > There is no difference (other than message shown to user) whether > > block_registration is True or False. > > How is this supposed to work? > > User is created but with a 'Disabled' flag? > > - this can then be enabled by an admin > > I see that this flag is registration_key='blocked' > > > Ideally some workflow would also be triggered (simple: email to admin) > > I see that block_registration is also used in verify_email() [line > 767], but again the logic seems incomplete. > If blocked then this doesn't happen: user.update_record > (registration_key='pending') > However the session.flash (should be self.environment.session.flash) > for self.messages.registration_pending gets overwritten by > self.environment.session.flash = self.messages.email_verified > > I think this is the wrong way around. > if self.settings.block_registration: > session.flash = self.messages.registration_pending > else: > user.update_record(registration_key='pending') > self.environment.session.flash = self.messages.email_verified > > Should be: > if self.settings.block_registration: > user.update_record(registration_key='pending') > self.environment.session.flash = > self.messages.registration_pending > else: > self.environment.session.flash = self.messages.email_verified > > Not sure of the rest of the logic exactly. > > Nothing documented onhttp://web2py.com/examples/default/tools#authentication > > F --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

