# Changed the way class.accounts\_ldap.inc save the information on Openldap

**URL:** <https://help.egroupware.org/t/changed-the-way-class-accounts-ldap-inc-save-the-information-on-openldap/45518>\
**Category:** eGW-developers\
**Created:** [February 10, 2011, 7:25am UTC](https://help.egroupware.org/t/changed-the-way-class-accounts-ldap-inc-save-the-information-on-openldap/45518 "2011-02-10T07:25:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![giorgiolago](https://help.egroupware.org/letter_avatar_proxy/v4/letter/g/edb3f5/32.png) [@giorgiolago](https://help.egroupware.org/u/giorgiolago)\
**Post date:** [February 10, 2011, 7:25am UTC](https://help.egroupware.org/t/changed-the-way-class-accounts-ldap-inc-save-the-information-on-openldap/45518/1 "2011-02-10T07:25:35Z")

</div>

hello friends, I use an openldap server wich iredmail solution, where users have a distinct name as follows:

dn: mail = giorgio@domain.tld, ou = Users, domainName = doimain.tld, o = domains, dc = domain, dc = tld  
My systems work with this structure, when the egroupware modify any information on the User, the egroupware stores the information by modifying the old structure like this: ’

dn: uid=giorgio,ou=Users,domainName=doimain.tld,o=domains,dc=domain,dc=tld

My question is, how to modify the class.accounts\_ldap.inc so that it saves the data as mail=user@domain.tld and not uid= user.  
For more information read this topics witch pics of problemam  
[http://www.iredmail.org/forum/topic1636-integration-with-egroupware-18-comunity-problems.html](http://www.iredmail.org/forum/topic1636-integration-with-egroupware-18-comunity-problems.html)  
thx all  
ps: sorry my english is soo bad

---

<div class="post-metadata">

**Author:** ![Ralf\_Becker\_Stylite](https://help.egroupware.org/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@Ralf\_Becker\_Stylite](https://help.egroupware.org/u/Ralf_Becker_Stylite)\
**Post date:** [February 10, 2011, 9:15am UTC](https://help.egroupware.org/t/changed-the-way-class-accounts-ldap-inc-save-the-information-on-openldap/45518/2 "2011-02-10T09:15:01Z")

</div>

Hi,

that’s done in 2 places:

phpgwapi/inc/class.accounts\_ldap.inc.php at line 200:

- !$is\_group && ($old[‘uid’] != $data\_utf8[‘account\_lid’] ||  
substr($old[‘dn’],0,4) != ‘uid=’))

- !$is\_group && ($old[‘uid’] != $data\_utf8[‘account\_lid’] /_||  
substr($old[‘dn’],0,4) != ‘uid=’_/))

addressbook/inc/class.addressbook\_ldap.inc.php at line 461:

- if(strtolower($dn) != strtolower($newDN) || $needRecreation)

- if(/_strtolower($dn) != strtolower($newDN) ||_/ $needRecreation)

The line numbers are from Trunk, so they may differ a little for 1.8.

Ralf

> ## hello friends, I use an openldap server wich iredmail solution, where users have a distinct name as follows: dn: mail = giorgio@domain.tld, ou = Users, domainName = doimain.tld, o = domains, dc = domain, dc = tld My systems work with this structure, when the egroupware modify any information on the User, the egroupware stores the information by modifying the old structure like this: ’ dn: uid=giorgio,ou=Users,domainName=doimain.tld,o=domains,dc=domain,dc=tld My question is, how to modify the class.accounts\_ldap.inc so that it saves the data as mail=user@domain.tld and not uid= user. For more information read this topics witch pics of problemam [http://www.iredmail.org/forum/topic1636-integration-with-egroupware-18-comunity-problems.html](http://www.iredmail.org/forum/topic1636-integration-with-egroupware-18-comunity-problems.html) thx all ps: sorry my english is soo bad
> 
> View this message in context: changed the way class.accounts\_ldap.inc  
> save the information on Openldap  
> [http://egroupware.219119.n3.nabble.com/changed-the-way-class-accounts-ldap-inc-save-the-information-on-Openldap-tp2464366p2464366.html](http://egroupware.219119.n3.nabble.com/changed-the-way-class-accounts-ldap-inc-save-the-information-on-Openldap-tp2464366p2464366.html)  
> Sent from the egroupware-developers mailing list archive  
> [http://egroupware.219119.n3.nabble.com/egroupware-developers-f278587.html](http://egroupware.219119.n3.nabble.com/egroupware-developers-f278587.html)  
> at [Nabble.com](http://Nabble.com).
> 
> * * *
> 
> The ultimate all-in-one performance toolkit: Intel® Parallel Studio XE:  
> Pinpoint memory and threading errors before they happen.  
> Find and fix more than 250 security defects in the development cycle.  
> Locate bottlenecks in serial and parallel code that limit performance.  
> [http://p.sf.net/sfu/intel-dev2devfeb](http://p.sf.net/sfu/intel-dev2devfeb)
> 
> * * *
> 
> eGroupWare-developers mailing list  
> [eGroupWare-developers@lists.sourceforge.net](mailto:eGroupWare-developers@lists.sourceforge.net)  
> [https://lists.sourceforge.net/lists/listinfo/egroupware-developers](https://lists.sourceforge.net/lists/listinfo/egroupware-developers)

–  
Ralf Becker  
Director Software Development

Stylite GmbH  
[open style of IT]

Morschheimer Strasse 15  
67292 Kirchheimbolanden

fon +49 (0) 6352 70629-0  
fax +49 (0) 6352 70629-30  
mailto: [rb@stylite.de](mailto:rb@stylite.de)

[www.stylite.de](http://www.stylite.de)  
[www.egroupware.org](http://www.egroupware.org)

* * *

Geschäftsführer Andre Keller, Ralf Becker  
Registergericht Kaiserslautern HRB 30575  
Umsatzsteuer-Id / VAT-Id: DE214280951

* * *

The ultimate all-in-one performance toolkit: Intel® Parallel Studio XE:  
Pinpoint memory and threading errors before they happen.  
Find and fix more than 250 security defects in the development cycle.  
Locate bottlenecks in serial and parallel code that limit performance.  
[http://p.sf.net/sfu/intel-dev2devfeb](http://p.sf.net/sfu/intel-dev2devfeb)

* * *

eGroupWare-developers mailing list  
[eGroupWare-developers@lists.sourceforge.net](mailto:eGroupWare-developers@lists.sourceforge.net)  
[https://lists.sourceforge.net/lists/listinfo/egroupware-developers](https://lists.sourceforge.net/lists/listinfo/egroupware-developers)

---

<div class="post-metadata">

**Author:** ![giorgiolago](https://help.egroupware.org/letter_avatar_proxy/v4/letter/g/edb3f5/32.png) [@giorgiolago](https://help.egroupware.org/u/giorgiolago)\
**Post date:** [February 10, 2011, 8:36pm UTC](https://help.egroupware.org/t/changed-the-way-class-accounts-ldap-inc-save-the-information-on-openldap/45518/3 "2011-02-10T20:36:30Z")

</div>

thank you so much ralph ! thats work ! thxxxxxxxxxxxxx ! 😃
