Skip to content

Commit

Permalink
Merge pull request web2py#1525 from michele-comitini/confirm_registra…
Browse files Browse the repository at this point in the history
…tion_redirect_fix

keep the _next while doing the redirect
  • Loading branch information
mdipierro authored Nov 14, 2016
2 parents bebdbd9 + 6b1225d commit 091d9c7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gluon/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -3672,7 +3672,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:
Expand Down Expand Up @@ -7067,4 +7072,4 @@ def save(self, options):

if __name__ == '__main__':
import doctest
doctest.testmod()
doctest.testmod()

0 comments on commit 091d9c7

Please sign in to comment.