Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Alan Wamser
Diable User Edits in My Account.
February 11, 2012 10:57 AM
Answer

Alan Wamser

Rank: Junior Member

Posts: 26

Join Date: April 15, 2010

Recent Posts

I'm going to sync users with Active Directory and don't want them to edit/change their screen name, first/last name, etc. Is this best was to pull this off via a hook?
Pankaj Kathiriya
RE: Diable User Edits in My Account.
February 12, 2012 10:15 PM
Answer

Pankaj Kathiriya

Rank: Liferay Master

Posts: 703

Join Date: August 4, 2010

Recent Posts

Yes,
You have to make those fields non-editable by overriding jsp by hook only.

Thanks,
Pankaj
Venkat Koppavolu
RE: Diable User Edits in My Account.
February 12, 2012 11:18 PM
Answer

Venkat Koppavolu

Rank: Junior Member

Posts: 85

Join Date: July 25, 2010

Recent Posts

Use below property in portal-ext.properties to customize


#
# Input a list of sections that will be included as part of the user form
# when updating a user in the My Account portlet.
#
users.form.my.account.main=details,password,organizations,communities,user-groups,roles,categorization
users.form.my.account.identification=addresses,phone-numbers,additional-email-addresses,websites,instant-messenger,social-network,sms,open-id
users.form.my.account.miscellaneous=announcements,display-settings,comments,custom-fields

Allow users not to update any field in MyAccount portlet

#
# Input a list of sections that will be included as part of the user form
# when updating a user in the My Account portlet.
#
users.form.my.account.main=
users.form.my.account.identification=
users.form.my.account.miscellaneous=

Thanks,
Venkat
Samuel Kong
RE: Diable User Edits in My Account.
February 13, 2012 1:42 AM
Answer

Samuel Kong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1556

Join Date: March 10, 2008

Recent Posts

There's nothing out of the box for first/last name, but for screen name and email address there's this property:

 1    #
 2    # Input a list of comma delimited user types who can edit their own fields.
 3    # Valid types are "administrator", "user-with-mx", and "user-without-mx".
 4    #
 5    # Set a value of "administrator" if an administrator can edit the specified
 6    # field. An administrator is anyone who has the Administrator role.
 7    #
 8    # Set a value of "user-with-mx" if a user who has an email address that
 9    # matches the company mail suffix can edit the specified field.
10    #
11    # Set a value of "user-without-mx" if a user who does not have an email
12    # address that matches the company mail suffix can edit the specified field.
13    #
14    # Set all three values if all users can edit the specified field. Set a
15    # combination of the three values if only a combination of the users can
16    # edit the specified field.
17    #
18    field.editable.com.liferay.portal.model.User.screenName=administrator,user-with-mx,user-without-mx
19    field.editable.com.liferay.portal.model.User.emailAddress=administrator,user-with-mx,user-without-mx