removing fieldsets from profile2 profiles

634 Views Asked by At

I've been trying to remove a couple of fieldsets (Biblio Settings and URL Redirects) from user profile2 profiles so that they aren't confusing to users who won't need to modify those settings. Everything I've found when searching for an answer to this question indicates that I should be able to unset the fieldsets in hook_form_alter(), but there are no fieldsets in the form when I visit user profiles, which must mean that they are inserted after hook_form_alter() is called.

That being the case, how can I accomplish my goal?

Thanks! Lee

1/9/13 Edit: It turns out the question is moot; if I'm logged in as one of the non-admin users I'm concerned about here, their lack of privileges prevents the fieldsets from appearing, which solves the problem. (I didn't realize that when I wrote the original post, obviously!) However, I am still curious about how one would go about removing the fieldsets if they were to appear (as they do for admin users) given the situation as I described it above.

0

There are 0 best solutions below