//not sure about the 1st line but i changed it in case of weird chars given at the ldap-server $uent->login = _esc($login); $uent->name = ucwords(strtolower($info[0]['cn'][0])); $uent->alias = _esc($login)." (".ucwords(strtolower($info[0]['cn'][0])).")";
// Sync user details, if enabled if (!empty($ini['LDAP_EMAIL'])) { q('UPDATE '. $GLOBALS['DBHOST_TBL_PREFIX'] .'users SET email='. _esc($info[0][ $ini['LDAP_EMAIL'] ][0]) .' WHERE login='. _esc($login)); } //wl: 20130706 David Kikl - Names + Alias style: "netxxx (Surename Gname)" if (!empty($ini['LDAP_NAME'])) { q('UPDATE '. $GLOBALS['DBHOST_TBL_PREFIX'] .'users SET name='. _esc(ucwords(strtolower($info[0][$ini['LDAP_NAME']][0]))) .' WHERE login='. _esc($login)); } if (!empty($ini['LDAP_ALIAS'])) { q('UPDATE '. $GLOBALS['DBHOST_TBL_PREFIX'] .'users SET alias='. _esc($login." (".ucwords(strtolower($info[0][$ini['LDAP_NAME']][0])).")").' WHERE login='. _esc($login)); #dbg('REFRESH_ALIAS: UPDATE '. $GLOBALS['DBHOST_TBL_PREFIX'] .'users SET alias='. _esc($login." (".ucwords(strtolower($info[0][$ini['LDAP_NAME']][0])).")").' WHERE login='. _esc($login)); }//else dbg("REFRESH_ALIAS: empty ALIAS?");
<p>HARDCODED LDAP Attributes for forum user alias:<br /> <b>username (Surename Gname)</b> (<- SURENAME GnAmE / surename GNAME / ect.)<br /> (wl/dk alias)</p> <p>HARDCODED LDAP Attributes for forum user real name:<br /> <b>Surename Gname</b> (<- SURENAME GnAmE / surename GNAME / ect.)<br /> (wl/dk alias)</p>
But if you really want to include it, I'll do a diff of the changes