Today Real Name shows a warning when you doesn't use the [user:name-raw] token in the email messages. It's cool already, because it remembers you to provide login information for the user that just registered in your site.

But I use Email Registration :-) So, for me, it doesn't makes sense because in my app the login is the email - there's no need to remeber usernames. So, it would be good to have a way to control the exhibition of this messages with a boolean variable that, if set to TRUE, makes Real Name avoid the annoying warning.

So, I'm gonna write the patch and try to attach the file here, since there's no PR workflow =(

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelwallis’s picture

Title: Avow warning for missing token [user:name-raw] » Allow no raw usernames in user emails - token [user:name-raw]
joelwallis’s picture

This is a patch that already works to me. Please check if the given variable name are self descriptive and the comments provide useful help for those looking to the code.

Dave Reid’s picture

Status: Active » Needs review

Interesting. I'd probably reverse the variable name to be a little more clear. Something more like !variable_get('realname_suppress_user_name_mail_validation', FALSE)

joelwallis’s picture

Now with suggested variable name.

joelwallis’s picture

I forgot to add the check to the requirements definition at realname.install.

joelwallis’s picture

So, what about this issue?

hass’s picture

Status: Needs review » Needs work

@Dave: why hiding this from ui? We should make this a setting, including variable uninstall.

hass’s picture

Title: Allow no raw usernames in user emails - token [user:name-raw] » Allow suppressing [user:name-raw] token warning in e-mail templates

  • hass committed e8adcce on 7.x-1.x authored by joelwallis
    Issue #2453291 by hass, joelwallis: Allow suppressing [user:name-raw]...
hass’s picture

Status: Needs work » Fixed

  • hass committed e8adcce on 8.x-1.x authored by joelwallis
    Issue #2453291 by hass, joelwallis: Allow suppressing [user:name-raw]...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

nickonom’s picture

Coming from #2765329: Suppress "replace token" messages when Email Registration module involved as I didn't know about this issue. Well, I wouldn't even create one if the problem was not persisting. It is still there on 7.x-1.3 despite:

hass committed e8adcce on 7.x-1.x authored by joelwallis
Issue #2453291 by hass, joelwallis: Allow suppressing [user:name-raw]

I am using this module with Email Registration and couldn't find any setting to suppress those messages. Can you explain where exactly I can suppress them?

nickonom’s picture

Status: Closed (fixed) » Active

Making this active again as it has not probably been committed yet.

hass’s picture

Status: Active » Closed (fixed)

See realname settings page.

nickonom’s picture

Status: Closed (fixed) » Active

Sorry for bothering again, but either The real Name settings page has only one field for replacing REALLY real name, which is in my case

[user:field-name] [user:field-surname]

and the complain on the user settings page is

The Body does not contain the [user:name-raw] token, which is necessary when using username for login.

and on the status page:

Replace the token [user:name] with [user:name-raw] in e-mail template, if using username for login.

Maybe I am missing something here, but I really need to user person's first name and last name combination as real name and his/her e-mail address as login username and at the same time get rid of those annoying messages. Could you please explain what I am doing wrong?

hass’s picture

Status: Active » Closed (fixed)

You need v1.3

nickonom’s picture

thanks hass. finally after downloading the new version of Real Name and applying the realname_update_7001 the messages are gone:

drush updb
 Realname  7001  Remove variables from D6 that are no longer needed.
Do you wish to run all pending updates? (y/n): y
Performed update: realname_update_7001                                                                                                               [ok]
'all' cache was cleared.                                                                                                                             [success]
Finished performing updates.                                                                                                                         [ok]