There's a problem while registering a user when web2py is using mssql. Here are the pertinent pieces to reproduce the problem:
- web2py version = 1.67.2 - web2py connected to mssql via pyodbc and freetds - registration_requires_verification = True - registration_requires_approval = False - email verification link has been clicked and clears registration_key from the database (confirmed by looking at field directly in the database) Upon a successive logout and log back in, logging in still requires email verification. After some time troubleshooting, I found that web2py, although it's setting registration_key = '' (empty string) in verify_email() (line 1018 in v.1.67.2), is actually saving a space in mssql. Thus, when registration_key is being evaluated upon login (tools.py lines 771-781 in v.1.67.2), line 778 in tools.py: elif temp_user.registration_key is evaluating space as something and therefore the if condition evaluates to true and causes: response.flash = \ self.messages.registration_verifying to trigger in a situation that registration_key should be evaluating to false and thus, bypassing the "requires verification" and allowing the user to log back in. For a temporary fix, I've changed line 778 to: elif temp_user.registration_key.strip() which resolves this specific problem. But, I still have the wonder in my mind what other areas of the framework may be affected by this same problem. Any Ideas?? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---