Hello,
While sending e-mails from "user verification" module, there are [user-verification:...] variables for the verification link and timeout that can be inserted within the e-mail body
Since I'm using another module for e-mail sending (rules + entity email), I don't see those variables there (but I see all tokens usually present under "replacement patterns", ex: user, node, site information, etc.)
Would it be possible to extend the "user" entity so that "user-verification" tokens can appear under it ? (like: [user:user-verification:link]
Thanks
Comments
Comment #1
doitDave commentedYes, that is possible and I think it is a really nice suggestion.
Could we collect some concrete suggestions for tokens?
I would vote for
Any other suggestions? Someone to propose a patch?
Comment #2
peter.bozovic commentedThis looks very good for me :)
I don't know if the "timeout" token can be proposed in several formats so that administrator can choose exactly how he can display it
Comment #3
doitDave commentedNeither do I. I suppose token will take care of it. If not, I won't - that effort would really be out of this module's scope. We will see.
Comment #4
peter.bozovic commentedFor me personnaly, it's really not so important. I will probably use generic text like "This link will expire in 24h"
Most important is the [user:verification:url] !
Comment #5
doitDave commentedIf it's done, it has to be done properly.
Comment #6
doitDave commentedThe latest dev snapshot (may take some hours) now provides the [user:verification] token.
You can use the token browser (e.g. in the account verification config page) to examine their details.
Thx for the suggestion, it was a good opportunity to dig into the token API and make the module a step more drupalish. Of course, some feedback and testing would be nice!
Edit: I just realize, at the moment, you would have to pass the verification values to token_replace(). So we need to find a way to have these tokens at hand in every possible situation. Not sure whether to attach it to the user object in hook_user_load() and/or to provide an API function which retrieves this data. Suggestions?
Comment #7
doitDave commentedComment #8
doitDave commentedGenerally reworked token management in the latest dev snapshot. Please check. Still needs testing whether the deprecated [user-verification:*] tokens still work for compatibility reasons.
Comment #9
doitDave commentedAlso note that I will remove the extended token support from the 1.x branch again. This feature will not be part of D6. Also, any new feature will only be added to the 2.x branch.
Comment #10
doitDave commentedComment #11
doitDave commentedAfter re- and re-re-testing I think I have now covered all possible token scenarios. Please be so kind to test it all over. Changes are in the 7.x-2.x-dev branch within the next 12 hours.
Note that the 2.x branch needs to run update.php in order to work as the DB table needed some small logical change.
Looking forward to any feedback!
Comment #12
doitDave commentedNow also available in 7.x-2.0-alpha1.
Comment #13
peter.bozovic commentedHello,
Results of my testing:
- Email Verification activated and using e-mail verification e-mail sending - Works
- Added Rule for sending additional e-mail with the verification tokens - Works
- Removed the e-mail verification e-mail sending (trough configuration settings) - E-mail configure trough Rules is sent, but verification code is not available within the url !
When both e-mails received, i see correctly the url "...user/123/verify/98b7cd39bac505cfd5b7705edd8e0d7f"
However, when the "Send verification mail" option is disabled, the url returned by the token is only ".../user/123/" without the code part
Some other token results:
[entity-email-to:verification:url:absolute] - Works only if "Send verification mail" is active
[entity-email-to:verification:code] - Doesn't work in any case
[entity-email-to:verification:expires:short] - Works in both cases
It looks like we are getting close to the goal :)
Thanks
Comment #14
peter.bozovic commentedHello,
Any news on this issue ?
Comment #15
doitDave commentedHey, thanks for your report. If you are already using u_v, you might have noticed the increasing spam reg level in the last months. This means obviously that the current implementation has been worked around by the other side - which was to be expected and then, not too difficult.
So far for the bad news. The good news is, I am working on an all new, really more powerful solution at the moment with a totally different and, by the way, far more hard-to-beat approach.
As we will not deal with registration anymore by then, I will close this issue as won't fix. Hope you understand.
As for the actual issue, tokens will need revision anyway. So I will close this here.
Comment #16
doitDave commentedComment #18
koushikuk commentedCan you please suggest how can I use token [user-verification:url:absolute] in my custom module file to send verification link?
Thanks in advance.