There are more settings to play around with and the book is not always up to date with source code changes. With that in mind I always check the source to see how it works when I am having trouble. The registration process and how it uses those settings is located in gluon/tools.py around line 2944 (web2py 2.12.03). If the way it is coded does not suit you can open an issue in github.
But why create a user account that might need to be deleted?. You seem to be trying to handle the situation in a roundabout way. How about using onvalidation to check all your fields before creating the user?. On Sunday, October 25, 2015 at 6:29:12 AM UTC-4, Pierre wrote: > > Yes ok but this is not what I want : > > > extracted from web2py book: > > " > > If you want to allow people to register and automatically log them in > after registration but still want to send an email for verification so that > they cannot login again after logout, unless they completed the > instructions in the email, you can accomplish it as follows: > > auth.settings.registration_requires_verification = True > auth.settings.login_after_registration = True > > " > here is the problem : > I added some extra fields to auth_user to provide geolocation data howewer > I cannot predict "geolocation user acceptance" so my idea was to simply > delete the user account in case geolocation is refused. but this cannot be > done since new user is logged in automatically (he cannot log out if his > account is deleted). Now I think about a different strategy using > permissions and roles like "cannot login till geolocation data provided". > This seems like a lot of complexity to solve a simple task ? > > Le dimanche 25 octobre 2015 03:55:34 UTC+1, DenesL a écrit : >> >> >> You also need >> >> settings.registration_requires_verification = True >> >> >> >> On Saturday, October 24, 2015 at 8:30:52 PM UTC-4, Pierre wrote: >>> >>> Hi everyone, >>> >>> I tried to do it with no success with this: >>> >>> auth.settings.login_after_registration = False >>> >>> thanks for your help >>> >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.