Auto editing user details by groups

loers November 20, 2013

Is it possible to auto-fill the details of users (Position, Department...) by their assigned groups? Or to set them automatically depending on their groups when they get created?

1 answer

0 votes
Ryan Goodwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2013

It would be possible by querying the database directly. The user profile details are stored in the os_propertyentry table under entity_key columns:

confluence.user.profile.position
confluence.user.profile.phone
confluence.user.profile.department
confluence.user.profile.location

Each of those records will have a value for entity_id which relates to the content table contentid field:

content.contentid

You'll see this record is for a content.contenttype = userinfo type page.

Now the trick here is that the os_propertyentry records do not exist until you add those properties for a given user. So you would need to add that information for each user that is a member of a group.

Groups are stored in cwd_group, memberships are stored in cwd_membership, and users are in cwd_user. You'd need to join the sql statements for those tables to get appropriate memberships.

I believe the userinfo record in the content table is created when the user is created in the database. This would be on ldap sync or first login depending on the user directory type.

Hope this helps!

loers November 26, 2013

First of all thank you for answering,

unfortunately I didn t know that our accounts are linked form the active directory and editing these fields is disabled in confluence :/ . So the best (only?!) way for solving my problem is to maintenance the data in the AD. I have already herad there is an issue for sharing more information between AD and confluence but I could not find it. Is it already possible?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events