The form at user/[uid]/edit should use an email form element.
It seems, according to #316886: hook_form_alter will not alter user-profile-form that a form_alter won't cut it here.
Haven't worked it out yet, mabe somebody else wil have a pointer.

CommentFileSizeAuthor
#3 html5_tools-898914.patch936 bytesericduran
#2 898914.patch696 bytesalanburke

Comments

ericduran’s picture

Hi alanburke,

thanks for the feature request. The more the merrier :)

Regarding this issue, the form can be alter using hook_user (http://api.drupal.org/api/function/hook_user)

It'll look something like this (note I just threw this together, it will not work, the brackets should be check to make sure they're balance.The form array might be wrong, I'm sure there's something else in there and is not just 'mail'. But this should point you in the right direction :-) )

function hook_user($op, &$edit, &$account, $category = NULL) {
  if ($op == 'form' && $category == 'account') {
    $form['mail']['#type'] = 'emailfield';
    );
   return $form
}
alanburke’s picture

StatusFileSize
new696 bytes

No Joy.
I get a warning from elements module.

Fatal error: Unsupported operand types in projects/html5toolsdev-6/sites/all/modules/elements/elements.module on line 141

Patch attached as a start for anybody else.

ericduran’s picture

Status: Active » Needs review
StatusFileSize
new936 bytes

Here's a working patch.

alanburke’s picture

Does the trick for me.
Good work.

ericduran’s picture

Status: Needs review » Reviewed & tested by the community

changing status because of alanburke's comment above ^^

bleen’s picture

Status: Reviewed & tested by the community » Fixed

committed to HEAD

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.