user: Extend do_create_user for guest users.

This commit is contained in:
Shubham Dhama
2018-12-30 15:29:33 +05:30
committed by Tim Abbott
parent 235b0db82b
commit 93e3543e5e
2 changed files with 7 additions and 3 deletions

View File

@@ -74,7 +74,9 @@ def create_user_profile(realm: Realm, email: str, password: Optional[str],
def create_user(email: str, password: Optional[str], realm: Realm,
full_name: str, short_name: str, active: bool = True,
is_realm_admin: bool = False, bot_type: Optional[int] = None,
is_realm_admin: bool = False,
is_guest: bool = False,
bot_type: Optional[int] = None,
bot_owner: Optional[UserProfile] = None,
tos_version: Optional[str] = None, timezone: str = "",
avatar_source: str = UserProfile.AVATAR_FROM_GRAVATAR,
@@ -87,6 +89,7 @@ def create_user(email: str, password: Optional[str], realm: Realm,
full_name, short_name, bot_owner,
is_mirror_dummy, tos_version, timezone)
user_profile.is_realm_admin = is_realm_admin
user_profile.is_guest = is_guest
user_profile.avatar_source = avatar_source
user_profile.timezone = timezone
user_profile.default_sending_stream = default_sending_stream