I have a script that lists the users of group confluence-users. Snippet:
users.each { userName ->
def user = userAccessor.getUserByName(userName)
if (user) {
def loginInfo = loginManager.getLoginInfo(user)
def lastSuccessfulDate = convertDate(loginInfo?.lastSuccessfulLoginDate)
def lastFailedDate = convertDate(loginInfo?.lastFailedLoginDate)
log.warn "${user.fullName};${user.name};${lastSuccessfulDate};${lastFailedDate}"
}
}
I also want the user state to be logged (disabled or not), but can't find how to do that.
All help appreciated!
You can try this
if (user) {
def loginInfo = loginManager.getLoginInfo(user)
def lastSuccessfulDate = convertDate(loginInfo?.lastSuccessfulLoginDate)
def lastFailedDate = convertDate(loginInfo?.lastFailedLoginDate)
def isActive = user.isActive()//false user is deactivate
Hi @Mohamed Benziane ,
Thanks.
But you are referring to the Jira docs, I am trying to list Confluence users.
isActive does not seem to exist for the class I use:
[Static type checking] - Cannot find matching method com.atlassian.confluence.user.ConfluenceUser#isActive().
Regards,
Patrick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, i miss the confluence tag. Can you try this :
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.