bulk_create_users: No longer de-alias user email addresses.

bulk_create.bulk_create_users is only called by initialize_voyager_db.py and
populate_db.py, both of which only have realms with single domains.

Part of a larger project to remove the Realm.domain field.
This commit is contained in:
Rishi Gupta
2016-11-11 09:51:23 -08:00
committed by Tim Abbott
parent 91f2582c2b
commit 411a7b08e0

View File

@@ -4,7 +4,7 @@ from six import text_type
from zerver.lib.initial_password import initial_password
from zerver.models import Realm, Stream, UserProfile, Huddle, \
Subscription, Recipient, Client, get_huddle_hash, resolve_email_to_domain
Subscription, Recipient, Client, get_huddle_hash, split_email_to_domain
from zerver.lib.create_user import create_user_profile
def bulk_create_realms(realm_list):
@@ -36,7 +36,7 @@ def bulk_create_users(realms, users_raw, bot_type=None, tos_version=None):
# Now create user_profiles
profiles_to_create = [] # type: List[UserProfile]
for (email, full_name, short_name, active) in users:
domain = resolve_email_to_domain(email)
domain = split_email_to_domain(email)
profile = create_user_profile(realms[domain], email,
initial_password(email), active, bot_type,
full_name, short_name, None, False, tos_version)