* Admin: new config to generate no or lowercase email addresses for new users

This commit is contained in:
Ralf Becker 2018-02-20 09:14:31 +01:00
parent 2dc5c06062
commit 8b88e748f7
4 changed files with 29 additions and 12 deletions

View File

@ -281,6 +281,7 @@ displayed length of input field (set rows=1 to limit length) admin de angezeigte
displaying html messages is disabled admin de Das Anzeigen von HTML Nachrichten ist deaktiviert
displaying plain messages is disabled admin de Das Anzeigen von Text Nachrichten ist deaktiviert
do not delete the category and return back to the list admin de Kategorie NICHT löschen und zurück zur Liste gehen
do not generate email addresses admin de Keine EMail Adressen erzeugen
do not offer introduction video admin de Einführungsvideo nicht anbieten
do not validate certificate admin de Zertifikat nicht überprüfen
do you also want to delete all global subcategories ? admin de Wollen Sie auch alle globalen Unterkategorien löschen?
@ -529,6 +530,7 @@ login-status admin de Angemeldet-Status
loginid admin de Login-ID
logintime admin de Anmeldezeit
logoutime admin de Abmeldezeit
lowercase email addresses admin de EMail Adressen mit Kleinbuchstaben
mail account admin de E-Mail Konto
mail settings admin de E-Mail-Einstellungen
main email-address admin de Stamm-E-Mail-Adresse

View File

@ -281,6 +281,7 @@ displayed length of input field (set rows=1 to limit length) admin en displayed
displaying html messages is disabled admin en displaying html messages is disabled
displaying plain messages is disabled admin en displaying plain messages is disabled
do not delete the category and return back to the list admin en Do NOT delete the category and return back to the list
do not generate email addresses admin en Do not generate EMail addresses
do not offer introduction video admin en Do not offer introduction video
do not validate certificate admin en Do not validate certificate
do you also want to delete all global subcategories ? admin en Do you also want to delete all global sub categories?
@ -530,6 +531,7 @@ login-status admin en Login status
loginid admin en Login ID
logintime admin en Login time
logoutime admin en Logout time
lowercase email addresses admin en Lowercase EMail addresses
mail account admin en Mail account
mail settings admin en Mail settings
main email-address admin en Main email address

View File

@ -18,19 +18,23 @@
</row>
<row>
<description value="How should EMail addresses for new users be constructed?" label="%s:"/>
<vbox>
<select id="newsettings[email_address_format]">
<option value="first-dot-last">{Firstname}.{Lastname}@domain.com</option>
<option value="first-last">{Firstname}{Lastname}@domain.com</option>
<option value="first-underscore-last">{Firstname}_{Lastname}@domain.com</option>
<option value="initial-last">{Initial}{Lastname}@domain.com</option>
<option value="initial-dot-last">{Initial}.{Lastname}@domain.com</option>
<option value="last-dot-first">{Lastname}.{Firstname}@domain.com</option>
<option value="last-first">{Lastname}{Firstname}@domain.com</option>
<option value="last-underscore-first">{Lastname}_{Firstname}@domain.com</option>
<option value="last">{Lastname}@domain.com</option>
<option value="first">{Firstname}@domain.com</option>
<option value="account">{Username}@domain.com</option>
</select>
<option value="first-dot-last">{Firstname}.{Lastname}@domain.com</option>
<option value="first-last">{Firstname}{Lastname}@domain.com</option>
<option value="first-underscore-last">{Firstname}_{Lastname}@domain.com</option>
<option value="initial-last">{Initial}{Lastname}@domain.com</option>
<option value="initial-dot-last">{Initial}.{Lastname}@domain.com</option>
<option value="last-dot-first">{Lastname}.{Firstname}@domain.com</option>
<option value="last-first">{Lastname}{Firstname}@domain.com</option>
<option value="last-underscore-first">{Lastname}_{Firstname}@domain.com</option>
<option value="last">{Lastname}@domain.com</option>
<option value="first">{Firstname}@domain.com</option>
<option value="account">{Username}@domain.com</option>
<option value="none">Do not generate EMail addresses</option>
</select>
<checkbox label="Lowercase EMail addresses" id="newsettings[email_address_lowercase]" value="true"/>
</vbox>
</row>
<row>
<description value="Enter the VFS-Path where additional images, icons or logos can be placed (and found by EGroupwares applications). The path MUST start with /,and be readable by all users" label="%s:"/>

View File

@ -531,6 +531,10 @@ class Accounts
*/
static function email($first,$last,$account,$domain=null)
{
if ($GLOBALS['egw_info']['server']['email_address_format'] === 'none')
{
return null;
}
foreach (array('first','last','account') as $name)
{
$$name = Translation::to_ascii($$name);
@ -557,6 +561,11 @@ class Accounts
array($first,$last,substr($first,0,1),$account,$dot,$underscore,''),
$GLOBALS['egw_info']['server']['email_address_format'] ? $GLOBALS['egw_info']['server']['email_address_format'] : 'first-dot-last').
($domain ? '@'.$domain : '');
if (!empty($GLOBALS['egw_info']['server']['email_address_lowercase']))
{
$email = strtolower($email);
}
//echo " = '$email'</p>\n";
return $email;
}