30 Jan
2006
30 Jan
'06
4:09 a.m.
On 28-Jan-06 15:50, Adrian Rossouw wrote:
function mymodule_form_alter($form_id, &$form) {
if ($form_id == 'user_edit') { // might have to double check the form id if (/* check that the user is not allowed to edit things*/) { $form['name']['#type'] = 'value'; // whatever the password requires. might have to make it hidden } }
return $form; }
This will remove those fields from the form if the user isn't allowed to edit them.
Yep. Thanks for the suggestion Adrian. I'll implement it this way to leave the hierarchical roles business till later in the game. -- Sammy Spets Synerger Pty Ltd http://www.synerger.com/