For the user email tokens, we should be able to use profile fields as tokens in addition to !username and !password and stuff.

I made a (I think is) working patch for it. comments?

all i did was added these lines... I'm not sure if there are better ways to do this in php.

  foreach ($account as $key => $value){
    if(preg_match('profile_*', $key) !=  1)
      $tokens['!'.$key] = $value;
#5 user.module.patch474 bytesberenddeboer
user-profile.patch145 bytesjasonch
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch user-profile.patch. View


julie.metivier’s picture

Thank you for these lines. It works well for me :)


Status: Needs review » Needs work

The last submitted patch, user-profile.patch, failed testing.

no longer here 133581’s picture

Not sure where to add these though... user.module ?
patch is not complete, it needs the file/revision info.

berenddeboer’s picture

I can't see how this patch even remotely could work.

berenddeboer’s picture

Version: 6.9 » 6.14
474 bytes

Here a better patch. Use !first_name instead of !profile_first_name. It's a patch against Drupal 6.14 as the customer isn't interested in upgrading this website.

Cyberwolf’s picture


Damien Tournoud’s picture

Component: user system » profile.module
Status: Needs work » Closed (won't fix)

Drupal 6 and 7 are feature frozen, and the profile module is deprecated. Won't fix.