Prevent Users from Changing Their E-mail Address

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Summary

This KB will help admins to hide the email field from User Profiles for all Confluence users who are not part of the confluence-administrator group, therefore preventing them from changing their e-mail address.

Solutio

The below steps will help admins hide the option for users to change their e-mail address by hiding the field entirely. They will still be able to edit other User Profile details. 

  • How to hide the email field for users that are not members of confluence-admin group. (If you want to expose the field for another particular group, replace confluence-administrator with the group name or add another group in addition to confluence-administrator.)

    • Site-wide changes
      • Navigate to Confluence Administration page >> Layout.

      • Under Site Layouts, search for Main Layout and click Edit/Create Custom.

      • Find the following section: <head> and </head> tags.

      • Copy and paste the following code before the </head> tag.

        • #if ($userAccessor.hasMembership('confluence-administrators', $helper.action.remoteUser.name))
          #else
              <script type="text/javascript">
              AJS.toInit(function(){
          AJS.$('#email-label').hide();
          AJS.$('#email').hide();
              });
          </script>
          #end

 Please test these customizations in a Staging Instance first. Once the customization is applied, users who are not part of confluence-administrators group will not be able to see or edit their email in their User Profile page.

Last modified on May 26, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.