This approach seems to work fine, but there may be a better way. Anyhow, this patch adds token support to the D7 branch. Please review before committing I've only tested this on my local single installation. But I thought I'd offer the solution none-the-less.

CommentFileSizeAuthor
email-d7-token-support.patch2.01 KBaklump

Comments

mh86’s picture

Status: Needs review » Postponed (maintainer needs more info)

Email field tokens are already available via the Entity API.
I think your patch is more or less obsolete, or are there any new tokens in your patch?

rolfmeijer’s picture

As far as I can tell the patch doesn’t add new tokens, it just makes the e-mail address plain-text. Which is nice, now it can be used in Rules, for instance.

boabjohn’s picture

Status: Postponed (maintainer needs more info) » Active

@mh86: sorry there's probably confusion here on my part, but I'm not getting token support where it is needed in my usecase (and also it appears the same for people on this issue: https://drupal.org/node/1253028)

REPLICATION
1. Create field, type = email
2. Set to required
3. Attempt to use token from "browse available tokens" list: [current-user:mail]
4. Attempt to save: get error > "[current-user:mail]" is not a valid email address

So, can you please explain what you mean by "Email field tokens are already available via the Entity API."?

That might close the other issue above as well.

FWIW, I applied the patch from @aklump, but suspect it must be a different usecase...I still get the same error.

Very happy to contribute some thank-you dollar$ or whatever to help make this happen (assuming new effort is required.)