Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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;
}
Comment | File | Size | Author |
---|---|---|---|
#5 | user.module.patch | 474 bytes | berenddeboer |
user-profile.patch | 145 bytes | jasonch | |
Comments
Comment #1
julie.metivier CreditAttribution: julie.metivier commentedThank you for these lines. It works well for me :)
Julie
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedNot sure where to add these though... user.module ?
patch is not complete, it needs the file/revision info.
Comment #4
berenddeboer CreditAttribution: berenddeboer commentedI can't see how this patch even remotely could work.
Comment #5
berenddeboer CreditAttribution: berenddeboer commentedHere 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.
Comment #6
Cyberwolf CreditAttribution: Cyberwolf commentedSubscribing.
Comment #7
Damien Tournoud CreditAttribution: Damien Tournoud commentedDrupal 6 and 7 are feature frozen, and the profile module is deprecated. Won't fix.