>
> In other words, I use 
> session.email
>  to test whether user gets to 'registered' page after the register form is 
> successfully processed or not. However, it seems that 'registered' function 
> is called before 'register' form is fully processed (i.e. 'session.email' 
> gets set), so that user is re-directed (from within the elif block above) 
> back to 'register' page.
>
>
> What would be an appropriate method here?
>

The auth.register() function does not set session.email, so that's probably 
why you're still getting the redirect after successful registration. You 
could instead use an auth.settings.registration_onaccept callback to add a 
flag to the session, or if you want to automatically login the user upon 
registration (by setting auth.settings.login_after_registration=True), you 
could just do:

elif not auth.user:

Anthony

Reply via email to