User Management component mode, disable name and schedule change

Hi, I have a project in version 8.0.10 using the User Management component on an Internal user source. I have the Mode property setup so that only the administrator level user can access the Manage Users mode, while other user levels can only access the Edit Current mode. The other users level should only be allowed to change their passwords, and not other user properties like username, First Name, and Last Name. I’ve set the component properties such as Contact info Editing Enabled and Schedule Adjustments Enabled to be admin only, however the other users can still change the other user properties besides password.


Therefore, I’m wondering if there is another component property for the User Management component, or if scripting may be used. Checking some other forum topics, it seems scripting password changes with internal user sources are limited.

This is what the OnSaveUser extension function is for. You can’t disable the fields, but you can reject changes to them. docs

Thanks Kathy. Found the onSaveUser extension function. Seems that the user argument may be used, which is a PyUser class when running user.getClass(). Is there a way to track if properties such as the First Name, Last Name components changed?

You can use system.user.getUser() to get the user as it exists before the changes. Then compare the properties between the user from getUser and the user object you get in onSaveUser to see if there are changes you care about.