'User must give a value' - administrator also?

TheoRichel - January 6, 2009 - 21:01

Some fields in my user profiles MUST be filled in by the users. That is a useful feature. However, as an administrator I fill in some fields before the user visits the profile for the first time. I am then also forced to fill in those fields, and I then put in 'Unknown'. As a consequence the user is not reminded anymore to fill in those fields since they are filled already (albeit with 'Unknown'). It would be nice if these fields were insensitive to a visit by the administrator. Is there a solution for this?

Many thanks

form alter if user role

coltrane - January 6, 2009 - 22:50

I don't think there's a contributed module that solves this, but one solution would be to implement hook_form_alter() and if the global user is the administrator, or in a certain role, set all the #required properties to false.

Thanks

TheoRichel - January 7, 2009 - 20:15

I do understand this partly. Can you tell me in which module I would have to do this?

TR

See if this will

spatz4000 - January 7, 2009 - 20:48

See if this will help:

http://drupal.org/project/profile_enforcer

From your description my workflow would be

Make profile fields optional.
Fill in fields before user visits.
Set profile_enforcer to do its thing to force users to fill in the fields you want.

After looking at the source of this module I am not sure it does what you need. hook_form_alter appears to be the best bet.

 
 

Drupal is a registered trademark of Dries Buytaert.