From 6b1225da029993b5231beaa83b86fa2b4b86702b Mon Sep 17 00:00:00 2001 From: Michele Comitini Date: Fri, 4 Nov 2016 09:59:49 +0100 Subject: [PATCH] keep the _next while doing the redirect --- gluon/tools.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gluon/tools.py b/gluon/tools.py index eb4a61f92..db0c2e818 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -3670,7 +3670,12 @@ def confirm_registration(self, key = request.args[-1] if key: session._reset_password_key = key - redirect(self.url(args='confirm_registration')) + if next: + redirect_vars = {'_next': next} + else: + redirect_vars = {} + redirect(self.url(args='confirm_registration', + vars=redirect_vars)) else: key = session._reset_password_key else: @@ -7065,4 +7070,4 @@ def save(self, options): if __name__ == '__main__': import doctest - doctest.testmod() + doctest.testmod() \ No newline at end of file