[development] Disabling E-mail field in User Account > Edit

Toufeeq Hussain toufeeqh at gmail.com
Sun Dec 11 18:15:50 UTC 2005


Hi,
On 12/11/05, Adrian Rossouw <adrian at bryght.com> wrote:
>
> On 11 Dec 2005, at 3:49 PM, Toufeeq Hussain wrote:
>
> > Hi,
> >
> > I'm trying to disable the e-mail and user_name filed in the User
> > Account Edit page.
> > These details will be populated from LDAP so an user should not be
> > able to edit them.
>
> This can be easily done using Drupal 4.7 :
>
> function mymodule_form_alter($form_id, $form) {
>    if ($form_id == 'user_edit') {
>      $form['account']['name']['#type'] => 'value';
>      $form['account']['email]['#type'] => 'value';
>    }
>
>    return $form;
> }
>
> For 4.6 you will have to edit the module.
>

Adrian,
Sadly I have to do this on Drupal 4.6 (4.6.3).

- toufeeq
 --
blog @ http://toufeeq.blogspot.com


More information about the development mailing list