Hello. I'm trying to customize the login and register forms as follows: - user() function does not return auth(), instead display two forms separately like this:
{{if not auth.is_logged_in():}} {{login_form = auth.login()}} {{=login_form.custom.begin}} ... {{=login_form.custom.submit}} {{=login_form.custom.end}} {{reg_form = auth.register()}} {{=reg_form.custom.begin}} ... {{=reg_form.custom.submit}} {{=reg_form.custom.end}} {{pass}} - Inside user() function it logs the user out manually when "http://.../[ app]/default/user/logout" is requested: if request.args(0) == 'logout': session.flash = T('You are logged out.') auth.logout() Everything works except session.flash is wiped clean when auth.logout() automatically redirects to default/index. How can I keep session.flash after redirect? Thanks.