@@ -702,7 +702,7 @@ def get_identity_type_from_umapi_user(self, umapi_user):
702
702
self .logger .error ('Found adobe user with no identity type, using %s: %s' , identity_type , umapi_user )
703
703
return identity_type
704
704
705
- def create_umapi_commands_for_directory_user (self , directory_user , do_update = False ):
705
+ def create_umapi_commands_for_directory_user (self , directory_user , do_update = False , console_trusted = False ):
706
706
"""
707
707
Make the umapi commands to create this user, based on his directory attributes and type.
708
708
Update the attributes of an existing user if do_update is True.
@@ -742,7 +742,7 @@ def create_umapi_commands_for_directory_user(self, directory_user, do_update=Fal
742
742
else :
743
743
attributes ['option' ] = 'ignoreIfAlreadyExists'
744
744
commands .add_user (attributes )
745
- if update_username is not None :
745
+ if update_username is not None and not console_trusted :
746
746
commands .update_user ({"email" : directory_user ['email' ], "username" : update_username })
747
747
return commands
748
748
@@ -761,7 +761,8 @@ def create_umapi_user(self, user_key, groups_to_add, umapi_info, umapi_connector
761
761
:type umapi_connector: user_sync.connector.umapi.UmapiConnector
762
762
"""
763
763
directory_user = self .directory_user_by_user_key [user_key ]
764
- commands = self .create_umapi_commands_for_directory_user (directory_user , self .will_update_user_info (umapi_info ))
764
+ commands = self .create_umapi_commands_for_directory_user (directory_user , self .will_update_user_info (umapi_info ),
765
+ umapi_connector .trusted )
765
766
if not commands :
766
767
return
767
768
if self .will_process_groups ():
0 commit comments