views: Move some login code from registration to auth.

Most of these have more to do with authentication in general than with
registering a new account.  `create_preregistration_user` could go
either way; we move it to `auth` so we can make the imports go only in
one direction.
This commit is contained in:
Greg Price
2017-10-26 15:27:59 -07:00
committed by Tim Abbott
parent 09cd47c6ad
commit fad3d56810
5 changed files with 54 additions and 53 deletions

View File

@@ -193,8 +193,8 @@ class SocialAuthMixin(ZulipAuthMixin):
# These functions need to be imported here to avoid cyclic
# dependency.
from zerver.views.auth import (login_or_register_remote_user,
redirect_to_subdomain_login_url)
from zerver.views.registration import redirect_and_log_into_subdomain
redirect_to_subdomain_login_url,
redirect_and_log_into_subdomain)
return_data = kwargs.get('return_data', {})