Hello,
I'm able to create a confluence user in groovy with the following script :
{code}
Here's how I create a user in Confluence Data Center 8.5.3, and add the user into a group.
Sorry, this didn't answer the question. But I record it here, since when I google how to create a user in Confluence using groovy, this post always comes on the first page. So I'd like to record the codes here, hope it could help someone.
import com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.confluence.user.UserAccessor
import com.atlassian.confluence.user.ConfluenceUserImpl
import com.atlassian.user.security.password.Credential
import com.atlassian.user.GroupManager
def userAccessor = ComponentLocator.getComponent(UserAccessor)
def groupManager = ComponentLocator.getComponent(GroupManager)
def user = new ConfluenceUserImpl("foo", "foo", "foo@email.local")
userAccessor.createUser(user, Credential.unencrypted('your password here'))
def group = groupManager.getGroup("some-group")
userAccessor.addMembership(group, user)
Please check this post which might give a hint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Original user never replied, but this seems to be the answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.