diff --git a/addressbook/js/app.js b/addressbook/js/app.js index cab4855dda..dff7f0acc1 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -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 = { diff --git a/admin/inc/class.admin_account.inc.php b/admin/inc/class.admin_account.inc.php index 793d78fb32..907c98a704 100644 --- a/admin/inc/class.admin_account.inc.php +++ b/admin/inc/class.admin_account.inc.php @@ -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