AnsweredAssumed Answered

Cannot add a user to a group

Question asked by aitor.caleroesri-es-esridist Employee on Oct 18, 2017
Latest reply on Oct 27, 2017 by aitor.caleroesri-es-esridist

Hello, I'm trying to add a user to group without invitation and it does not work. Here is the code I'm using:

newuser = gis.users.create(username = "name.surname",
                            password = None,
                            firstname = "Name",
                            lastname = "Surname",
                            email = "name.surname@email.com",
                            role="org_publisher")
group.add_users(newuser)

And I get this:

{'notAdded': ['lastLogin',
  'privileges',
  'access',
  'role',
 ... ROWS DELETED 
  'username']}

If I try instead to use group.add_users("name.surname") I get this:

{'notAdded': ['a', 'r', 's', 'e', 'u', 'M', 'n', '.']}

The "group" object is valid, btw. and I set its invitation policy to false using this: "is_invitation_only=False"

 

What I'm doing wrong? How can I add a user to group without invitation?

 

Thanks in advance!

Outcomes