Is there any way to restrict a user from updating their user details (first name, last name, email etc...)? Revoking CRUD access to the user object does not stop this.

Currently users can navigate to their profile by clicking on their name and then "My Profile". On this screen they are able to change their user details.


5 Answers 5


I would just create a custom setting to toggle on/off plus a standard validation rule, I haven't tried it personally, it may not work. But would try that before code.


Write trigger on users object and show error if user is not system admin and he is trying to update user record..

  • Yeah that is what I have been doing in the past but was hoping that there would of been a profile permission based solution
    – BarCotter
    Apr 25, 2014 at 11:17

Write validation rule on user object

    (ISCHANGED(Email)) )
    && NOT(CONTAINS( $Profile.Name , "System Administrator" ))
  • watch out, this only works in English. If you switch the language then Administrator profile name changes
    – alesremta
    Apr 24 at 7:23

Using a Trigger:

A trigger can be added that will fire when the user record is edited. The trigger can then check for any desired criteria and add an error if needed.

Using a Validation Rule:

A validation rule could be added to the User object. The validation below will stop all users except the System Administrators from editing the Email field.

    NOT(CONTAINS( $Profile.Name , "System Administrator"))

You can use the following Visualforce page to allow user to be routed to User Detail Edit page only if they are System Admin and redirect to User Detail View page if they are not, when a user clicks edit button on User Detail:

The Visualforce page with below code can be used to override Edit action for User

<apex:page standardController="User" action="{!if($Profile.Name='System Administrator',URLFOR('/'&$CurrentPage.parameters.id&'/e', $CurrentPage.parameters.id, [retURL=URLFOR('/'&$CurrentPage.parameters.id&'?noredirect=1&isUserEntityOverride=1')], true), URLFOR('/'&$CurrentPage.parameters.id&'?noredirect=1&isUserEntityOverride=1', $CurrentPage.parameters.id, null, true))}" >

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .