mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
only generate default email address for new accounts, allows to set empty email address for existing accounts or by emptying it before save for new accounts
This commit is contained in:
parent
e47cb0f3f6
commit
0d63cbbd93
@ -670,7 +670,6 @@ app.classes.addressbook = AppJS.extend(
|
||||
case 'account_lid':
|
||||
case 'n_family':
|
||||
case 'n_given':
|
||||
case 'email':
|
||||
case 'account_passwd_2':
|
||||
var values = this.et2._inst.getValues(this.et2);
|
||||
var data = {
|
||||
|
@ -250,8 +250,8 @@ class admin_account
|
||||
*/
|
||||
public static function ajax_check(array $data, $changed)
|
||||
{
|
||||
// generate default email address
|
||||
if (empty($data['account_email']) || !$data['account_id'] && in_array($changed, array('n_given', 'n_family')))
|
||||
// generate default email address, but only for new accounts
|
||||
if (!$data['account_id'] && in_array($changed, array('n_given', 'n_family', 'account_lid')))
|
||||
{
|
||||
$email = common::email_address($data['account_firstname'], $data['account_lastname'], $data['account_lid']);
|
||||
if ($email && $email[0] != '@' && strpos($email, '@')) // only add valid email addresses
|
||||
|
Loading…
Reference in New Issue
Block a user