1

I've got a logintoboggan (http://drupal.org/project/logintoboggan/) module and my login is an email adress, so I dont want to have a "Name: " field on my profile edit page.

But when i just call in my theme preprocess page:

$vars['form']['account']['name']['#required'] = FALSE;

or unset() the field I've got an error:

Username field is required.

How can I disable validation of this field? Thanks!

0

The username field is a required field in the {users} table so it has to be there one way or another.

A way round it might be to remove the "Change own username" permission for authenticated users at http://mysite.com/admin/user/permissions. I can't remember if the field will still display on the user edit form but either way it won't be editable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.