mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
Remove active parameter from do_create_user().
Almost all callers to do_create_user were trying to create active users, except for one test. The active=False codepath was kind of broken (things like sending welcome messages had sort of undefined behavior there), so instead of trying to maintain it, we just update the one test (`test_people`) to flip the `is_active` flag manually. Fixes #7197
This commit is contained in:
@@ -428,16 +428,16 @@ def notify_created_bot(user_profile):
|
||||
send_event(event, bot_owner_user_ids(user_profile))
|
||||
|
||||
def do_create_user(email, password, realm, full_name, short_name,
|
||||
active=True, is_realm_admin=False, bot_type=None, bot_owner=None, tos_version=None,
|
||||
is_realm_admin=False, bot_type=None, bot_owner=None, tos_version=None,
|
||||
timezone=u"", avatar_source=UserProfile.AVATAR_FROM_GRAVATAR,
|
||||
default_sending_stream=None, default_events_register_stream=None,
|
||||
default_all_public_streams=None, prereg_user=None,
|
||||
newsletter_data=None, default_stream_groups=[]):
|
||||
# type: (Text, Optional[Text], Realm, Text, Text, bool, bool, Optional[int], Optional[UserProfile], Optional[Text], Text, Text, Optional[Stream], Optional[Stream], bool, Optional[PreregistrationUser], Optional[Dict[str, str]], List[DefaultStreamGroup]) -> UserProfile
|
||||
# type: (Text, Optional[Text], Realm, Text, Text, bool, Optional[int], Optional[UserProfile], Optional[Text], Text, Text, Optional[Stream], Optional[Stream], bool, Optional[PreregistrationUser], Optional[Dict[str, str]], List[DefaultStreamGroup]) -> UserProfile
|
||||
|
||||
user_profile = create_user(email=email, password=password, realm=realm,
|
||||
full_name=full_name, short_name=short_name,
|
||||
active=active, is_realm_admin=is_realm_admin,
|
||||
is_realm_admin=is_realm_admin,
|
||||
bot_type=bot_type, bot_owner=bot_owner,
|
||||
tos_version=tos_version, timezone=timezone, avatar_source=avatar_source,
|
||||
default_sending_stream=default_sending_stream,
|
||||
|
||||
Reference in New Issue
Block a user