Fixed. here is patch for iRedAdmin-Pro-LDAP-2.2.1. if you're not familiar with patch, i can send you patched version, then you upgrade to patched version by following this short tutorial:
http://www.iredmail.org/docs/migrate.or … admin.html
Note: it's bug that iRedAdmin-Pro cannot save empty value of "User/Employee ID", "Job title", "Mobile". But it's not bug in "Display Name", "First Name", "Last Name", LDAP requires these 3 attributes, and if you submit an empty value, iRedAdmin-Pro will set its value to username part of email address. With this patch, iRedAdmin-Pro will show empty value if its value is same as username part of email address.
diff -r 247d2bd24370 templates/default/ldap/user/profile.html
--- a/templates/default/ldap/user/profile.html Mon Jan 26 23:11:24 2015 +0800
+++ b/templates/default/ldap/user/profile.html Thu Jan 29 00:15:41 2015 +0800
@@ -195,7 +195,9 @@
tooltip=_('Full name'),
show_first_last_name=true,
first_name=first_name,
- last_name=last_name) }}
+ last_name=last_name,
+ email=mail,
+ empty_if_equal_to_username=true) }}
{{ display_preferred_language(value=entries.get('preferredLanguage', ['en_US'])[0], languagemaps=languagemaps) }}
{{ display_quota(value=mailQuota, show_value_in_input=true, used_quota=usedQuota, show_used_quota=true) }}
diff -r 247d2bd24370 libs/ldaplib/ldaputils.py
--- a/libs/ldaplib/ldaputils.py Mon Jan 26 23:11:24 2015 +0800
+++ b/libs/ldaplib/ldaputils.py Thu Jan 29 00:17:30 2015 +0800
@@ -102,7 +102,7 @@
if default:
mod_attr = [(ldap.MOD_REPLACE, attr, default.encode('utf-8'))]
else:
- mod_attr = []
+ mod_attr = [(ldap.MOD_REPLACE, attr, None)]
return mod_attr
diff -r 247d2bd24370 templates/default/macros/general.html
--- a/templates/default/macros/general.html Mon Jan 26 23:11:24 2015 +0800
+++ b/templates/default/macros/general.html Thu Jan 29 00:52:19 2015 +0800
@@ -744,11 +744,28 @@
size="size-250",
show_first_last_name=false,
first_name='',
- last_name='') -%}
+ last_name='',
+ email='',
+ empty_if_equal_to_username=true) -%}
{% if cn is sameas none %}
{% set cn = '' %}
{% endif %}
+ {% if accountType == 'user' %}
+ {% set username = email.split('@', 1)[0] %}
+ {% if cn == username and empty_if_equal_to_username %}
+ {% set cn = '' %}
+ {% endif %}
+
+ {% if first_name == username and empty_if_equal_to_username %}
+ {% set first_name = '' %}
+ {% endif %}
+
+ {% if last_name == username and empty_if_equal_to_username %}
+ {% set last_name = '' %}
+ {% endif %}
+ {% endif %}
+
<div class="form-field clear">
{% if accountType == 'domain' %}
<h4 class="{{ size }} fl-space">{{ _('Company/Organization Name') }}</h4>