mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
change needed for integration of emailadmin
ldap bugfixing
This commit is contained in:
parent
ec432051ff
commit
e3dde66e08
@ -682,6 +682,13 @@
|
||||
}
|
||||
*/
|
||||
|
||||
if ($GLOBALS['phpgw_info']['server']['account_repository'] == 'ldap' &&
|
||||
(!$_userData['account_lastname'] && !$_userData['lastname']))
|
||||
{
|
||||
$error[$totalerrors] = lang('You must enter a lastname');
|
||||
$totalerrors++;
|
||||
}
|
||||
|
||||
if (!$_userData['account_lid'])
|
||||
{
|
||||
$error[$totalerrors] = lang('You must enter a loginid');
|
||||
|
@ -718,7 +718,7 @@
|
||||
$entry['objectclass'][0] = 'top';
|
||||
$entry['objectclass'][1] = 'posixGroup';
|
||||
$entry['objectclass'][2] = 'phpgwAccount';
|
||||
$entry['cn'] = $account_info['account_lid'];
|
||||
$entry['cn'] = utf8_encode($account_info['account_lid']);
|
||||
$entry['gidnumber'] = $account_id;
|
||||
$entry['userpassword'] = $GLOBALS['phpgw']->common->encrypt_password($account_info['account_passwd']);
|
||||
$entry['description'] = 'phpgw-created group';
|
||||
@ -726,9 +726,17 @@
|
||||
else
|
||||
{
|
||||
$dn = 'uid=' . $account_info['account_lid'] . ',' . $this->user_context;
|
||||
$entry['cn'] = sprintf("%s %s", $account_info['account_firstname'], $account_info['account_lastname']);
|
||||
$entry['sn'] = $account_info['account_lastname'];
|
||||
$entry['givenname'] = $account_info['account_firstname'];
|
||||
|
||||
$entry['cn'] = utf8_encode(sprintf("%s %s",
|
||||
$account_info['account_firstname'],
|
||||
$account_info['account_lastname']
|
||||
));
|
||||
|
||||
$entry['sn'] = utf8_encode($account_info['account_lastname']);
|
||||
|
||||
if($account_info['account_firstname'])
|
||||
$entry['givenname'] = utf8_encode($account_info['account_firstname']);
|
||||
|
||||
$entry['uid'] = $account_info['account_lid'];
|
||||
$entry['uidnumber'] = $account_id;
|
||||
if ($GLOBALS['phpgw_info']['server']['ldap_group_id'])
|
||||
@ -756,7 +764,7 @@
|
||||
|
||||
ldap_add($this->ds, $dn, $entry);
|
||||
}
|
||||
/* print ldap_error($this->ds); */
|
||||
// print ldap_error($this->ds);
|
||||
|
||||
if($account_id && is_object($GLOBALS['phpgw']->preferences) && $default_prefs)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user