Feature #17055
closed
Enable fe_users-fields in "forgot password" mail
Added by Thorsten Kahler over 17 years ago.
Updated about 6 years ago.
Estimated time:
(Total: 0.00 h)
Description
EXT:sr_feuser_register and others add new field to table fe_users. When sending the "forgot password" mail it's useful to have access to arbitrary fields of the table.
The attached patch not only reads all fields from table fe_users. It also changes the way of accessing the fe_users to use the API on a higher level.
(issue imported from #M5090)
Files
one by one :-)
but thanks for your patch!
atm forgotten mail is not templatable, but markers could be added by TS using _LOCAL_LANG-setting
It is not possible to add markers to the TS template because of the way the translation string from the translation file is used:
<label index="ll_forgot_email_password">Uw wachtwoord
Hallo %s
Uw gebruikersnaam is "%s"
Uw wachtwoord is "%s"
Wij raden U aan uw wachtwoord direct te wijzigen in een wachtwoord dat U beter kunt onhouden.
</label>
The first line is used ad email subject . . . No newlines are possible in TS entry ( slash 'n' does not work).
Steffen notes:
You can use the LOCAL_LANG feature with 'braces' () . . . then you can enter a multi line translation string.
Also, you can use %$[n]s . . . . for example %$2s to use the second parameter.
plugin.tx_felogin_pi1 {
_LOCAL_LANG.nl {
ll_forgot_email_password (
Uw wachtwoord
Beste %2$s,
Uw gebruikersnaam is "%2$s"
Uw wachtwoord is "%3$s"
Wij raden U aan uw wachtwoord direct te wijzigen in een wachtwoord dat U beter kunt onhouden.
)
}
}
multiline is possible with syntax
bla.value (
...
...
...
)
It is also possible to use a specific replace string.
The %s values are email, username, password
If you want to use 2nd one(username) you can use syntax
%2$s
see http://www.php.net/manual/en/function.sprintf.php
- Status changed from Accepted to Under Review
- Assignee set to Jigal van Hemert
- Target version deleted (
0)
- PHP Version set to 5.3
- Complexity set to easy
- TYPO3 Version set to 4.7
Gerrit Code Review wrote:
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7503
This is a totally different approach: adding a hook after the generation of the message. This needs extra PHP code just to use a value already retrieved from the DB. Would have been nice if the different intention was mentioned here.
Thorsten Kahler wrote:
This is a totally different approach: adding a hook after the generation of the message. This needs extra PHP code just to use a value already retrieved from the DB. Would have been nice if the different intention was mentioned here.
There were several different wishes for this message. Some wanted support for markers, others wanted other FE user fields in it. Because felogin only retrieves a few fields from the database the most flexible solution is to add a hook. This gives the possibility to add marker sections, other marker systems, data from anywhere in the world, etc.
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF