-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mail use fullname #71
base: master
Are you sure you want to change the base?
Conversation
Added config option to get mail adress from LDAP for resetbytoken. Di…
Append mail_signature to every Mail that is sent by the system. Defau…
update to master fork
i.e. "fullname" -> Hello Jones Smith "givenname" -> Hello Jones "login" -> Hello jsmith
Found a bug, will resolve it by tomorrow. |
Thanks for the PR, will have a look later. |
What is the status here? |
I believe SSP should provide a way to override lang files without touching the provided files in /lang/* to offer more flexibility. For example, by including a new file "conf/lang_overrides.inc.php" after the This file would replace {login} by {firstname} in email templates, $messages['resetmessage'], $messages['changemessage'] The |
@plewin thanks for your idea, this would be a much better way to deal with it. |
@dlang9159 Sorry if it is getting a bit off topic but what changes would you like to see in the language backend ? |
@plewin For instance the one you already mentioned: I'd like to alter some strings like the mail text for example add a signature ( #67 was kind of a workaround). But the most "annoying" thing is that you have to add new language strings to all *.inc.php files manually (or did I miss something). It would be more convenient to use a look-up function that returns the (english) default string if the language doesn't support it yet. But this is just my personal opninion and it is open to discussion. I am aware that this leads to more complexity. Maybe I should add an issue where we can discuss this in more depth. |
Sorry for delay, I still need to check the code and merge it |
Changing how we manage language files will not solve completely this issue, as we need to search in LDAP directory the attribute we want to put in the message. So we need at least a configuration parameter that can be an array and set all attributes we want to get from user entry. Then we can indeed have an easy way to override lang messages. I've done that in White Pages: if (file_exists("../conf/$lang.inc.php")) {
require_once("../conf/$lang.inc.php");
} It allows to define a lang file in conf directory that will override or add messages. What do you think? |
This looks ok for me. Of course we must define what attributes we want to get. If we agree on your suggestion for the language file I will alter my PR to support this feature. |
@dlang9159 Attributes will be configured, but we can indeed have a default value with these ones, for example: $ldap_attributes = array('uid', 'cn', 'sn', 'givenname'); I will open a new issue for the language file override. |
I believe the default should be an empty array
If there is no extra attributes to fetch, nothing will be fetched. Also I think there is a bit too much of code duplication in this PR. |
@plewin you are totally right with code duplication, I will move most of it to lib/functions.inc.php |
Hi
...
pages/resetbytoken.php
....
pages/change.php
...
At the end change the tag {login} to {username} in your translation files. I was not tested with Windows AD! |
We must find a cleaner way to get attributes from user and use them in mails. The configuration must be generic |
Hello, This is an old PR for SSP 1.1 so i would like to know if it's still necessary to keep it open ? |
I wrote this because I wanted my emails to look more pretty by displaying the fullname of a user instead of the username/login. Instead of "jsmith92" you can also use "Jones Smith" or just "Jones". Default option is still the login name.