Point registration to correct url.

While logging through GitHub if the realm of the user doesn't
exist then we are redirected to registration page but the action
points to the complete url of the GitHub oAuth overflow.
This commit is contained in:
Umair Khan
2016-07-26 14:05:59 +05:00
committed by Tim Abbott
parent 2df62d4539
commit 0aa72cb347

View File

@@ -405,8 +405,9 @@ def maybe_send_to_registration(request, email, full_name=''):
# Explanation: http://stackoverflow.com/a/5605354/90777
urllib.parse.quote_plus(full_name.encode('utf8')))))
else:
url = reverse('register')
return render_to_response('zerver/accounts_home.html',
{'form': form, 'current_url': request.get_full_path},
{'form': form, 'current_url': lambda: url},
request=request)
def login_or_register_remote_user(request, remote_username, user_profile, full_name=''):