Needs review
Project:
Signup
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Aug 2008 at 22:32 UTC
Updated:
16 Feb 2015 at 15:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dwwThanks for the patch, this will be very useful. Amazingly, this still applies after #290734: Cleanup, unify and fix hard-coded signup email tokens. ;)
Visual inspection looks great. Light testing mostly seems fine.
However, the original bug from #290734, namely that %username wasn't handled properly for anonymous users, is a problem here, too. I'm not sure if there's ANYTHING we can do about that, other than perhaps update the help text somehow. :( Basically, any user tokens you put in a message end up empty for any anonymous signups. E.g. I have a test site with a node that has both auth and anon signups. I did a broadcast with the following body:
The resulting email looks like this for auth:
But it looks like this for the anon signups:
Utterly expected behavior (for me, the developer looking at this patch), but probably going to confuse and annoy end users.
Maybe the "Replacement tokens" fieldset should be split up into two lists, and we have some warning text before we list all the user tokens that says something like:
"Warning: the following replacement tokens will only have values for authenticated users that signed up. If your site allows anonymous users to signup, all of these tokens will be empty in the resulting message for those users."
??
I did that in the attached patch, but I don't think it really works. :( The warning message is easily lost in the huge list of tokens. :( Maybe we need separate fieldsets for the two kinds of tokens so it's more obvious? That'd unfortunately require a bigger patch.
Any other thoughts on what to do about this?
Comment #2
deviantintegral commentedYes, I ran into this too. What about having two fields for confirmation and reminders - one for anonymous users, one for authenticated users? There could be an on-by-default option to keep them the same. That would allow something like a salutation to be customized, ie "Dear [username]," and "Dear valued customer," easily per-site or per node. In your case, you could even replace the "you registered" with "please register".
--Andrew
Comment #3
dwwSeparate fields for anon + auth seems a little out of scope for this issue. Probably something to consider for #290305: Split out email functionality into separate submodule(s). I'm really not happy with how all the email stuff is being handled now, and splitting up the fields seems like it's just going to make a bad situation worse, unless it's done in the context of a deeper reorganization/rewrite.
I'm tempted to mark this "postponed", but I hate to prevent useful functionality (with very little cost) for sites without anon signups just because things get weird on sites that allow anon signups. Hrm.
Comment #4
dwwNo longer applies after #549646: Expose signup-related node and signup values to token.module. Still not sure what to do about this, but I'm leaning towards committing it anyway and leaving things a bit wonky for sites that allow anonymous. :/
Comment #5
dwwComment #6
deviantintegral commentedI have the feeling that the multitude of fields for this issue could use the same solution as the Signup Status module, whatever that ends up being.
Does anyone have any solutions *other* then two fields for handling this?
Comment #7
tevih commentedSeems that the tokens are available, however, they do not work as they should.
[user-name] - sends out an emails to *all signups* with a currently logged in user's user name! So, everybody is seeing "Anthony Hopkins" in their email if he is currently logged in (and beginning with "A" he's at the top of the list)
[realname] - Sends out emails to everybody with the Realname of the person who *created* the signup, not the person who's receiving the email.
Comment #8
qler commented*subs*
Comment #9
adamdicarlo commentedThis patch adds user tokens. I've tested it with content_profile, with its content_profile_tokens module enabled.
This is a really simple patch that doesn't do anything to try to handle anonymous users or users without content profiles.
Comment #10
adamdicarlo commentedComment #11
ambereyes commentedIs it possible to get the original patch for the current version 6 dev?
Comment #12
adamdicarlo commentedNew version of my patch in #9 that also adds the tokens to reminder emails, which #9 didn't.
Rolled off of 6.x-1.0.
Comment #13
djdevinExpanded on the patch, there were still some missing places where token_replace didn't get the user.
Comment #14
djdevinComment #15
p2252 commentedFor tokens in reminder mails #14 didn't work for me, so I used the code in patch #12, for some reason the uid doesn't work to load the tokens in reminder mails.