I would like to make the email field on the profile page for subscribers read only. They can see their email but not change it. I want only admins to to be able to change users email address.
Leave a Reply
You must be logged in to post a comment.
I would like to make the email field on the profile page for subscribers read only. They can see their email but not change it. I want only admins to to be able to change users email address.
You must be logged in to post a comment.
Although the readonly attribute can be removed using Chrome/Firebug inspector (making the field editable again), much probably the average user will not know this.
@brasofilo’s answer is good, but better use .prop and the .user-email-wrap class to prevent impact on #email fields on other pages.