mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-12 17:08:34 +01:00
Fixes for php3 and ldapimport/export
This commit is contained in:
parent
4bd07b53e2
commit
43d0b504ae
@ -294,8 +294,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function isin_array($needle,$haystack=array())
|
function isin_array($needle,$haystack='')
|
||||||
{
|
{
|
||||||
|
if(gettype($haystack) != 'array')
|
||||||
|
{
|
||||||
|
return False;
|
||||||
|
}
|
||||||
for($i=0;$i<count($haystack) && $haystack[$i] !=$needle;$i++);
|
for($i=0;$i<count($haystack) && $haystack[$i] !=$needle;$i++);
|
||||||
return ($i!=count($haystack));
|
return ($i!=count($haystack));
|
||||||
}
|
}
|
||||||
@ -489,7 +493,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ds = $phpgw->common->ldapConnect();
|
$ds = $phpgw->common->ldapConnect();
|
||||||
$acct_type = $this->acct_type;
|
$acct_type = $this->get_type($account_id);
|
||||||
|
|
||||||
if ($acct_type == 'g' && $phpgw_info['server']['ldap_group_context'])
|
if ($acct_type == 'g' && $phpgw_info['server']['ldap_group_context'])
|
||||||
{
|
{
|
||||||
@ -537,16 +541,16 @@
|
|||||||
$this->acct_type = $account_type;
|
$this->acct_type = $account_type;
|
||||||
|
|
||||||
/* echo '<br>in create for account_lid: "'.$account_lid.'"'; */
|
/* echo '<br>in create for account_lid: "'.$account_lid.'"'; */
|
||||||
if (empty($account_info['id']) || !$account_info['id'])
|
if (empty($account_info['account_id']) || !$account_info['account_id'])
|
||||||
{
|
{
|
||||||
$account_id = $this->get_nextid($account_info['account_type']);
|
$account_id = $this->get_nextid($account_info['account_type']);
|
||||||
/* echo '<br>using'.$account_id;exit; */
|
/* echo '<br>using'.$account_id;exit; */
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$account_id = $account_info['account_id'];
|
||||||
|
}
|
||||||
$entry['userpassword'] = $account_info['account_passwd'];
|
$entry['userpassword'] = $account_info['account_passwd'];
|
||||||
// $entry['phpgwaccountlastlogin'] = $account_info['lastlogin'];
|
|
||||||
// $entry['phpgwaccountlastloginfrom'] = $account_info['lastloginfrom'];
|
|
||||||
// $entry['phpgwlastpasswdchange'] = $account_info['lastpasswd_change'];
|
|
||||||
// $entry['phpgwaccountstatus'] = $account_info['account_status'];
|
|
||||||
$entry['phpgwaccounttype'] = $account_info['account_type'];
|
$entry['phpgwaccounttype'] = $account_info['account_type'];
|
||||||
$entry['phpgwaccountexpires'] = $account_info['account_expires'];
|
$entry['phpgwaccountexpires'] = $account_info['account_expires'];
|
||||||
|
|
||||||
@ -673,6 +677,11 @@
|
|||||||
$entry['objectclass'][5] = 'shadowAccount';
|
$entry['objectclass'][5] = 'shadowAccount';
|
||||||
$entry['objectclass'][5] = 'phpgwAccount';
|
$entry['objectclass'][5] = 'phpgwAccount';
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
echo '<pre>';
|
||||||
|
var_dump($entry);
|
||||||
|
echo '</pre>';
|
||||||
|
*/
|
||||||
|
|
||||||
ldap_add($ds, $dn, $entry);
|
ldap_add($ds, $dn, $entry);
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@
|
|||||||
|
|
||||||
function create($account_info)
|
function create($account_info)
|
||||||
{
|
{
|
||||||
if (empty($account_info['id']) || !$account_info['id'])
|
if (empty($account_info['account_id']) || !$account_info['account_id'])
|
||||||
{
|
{
|
||||||
$account_id = $this->get_nextid($account_info['account_type']);
|
$account_id = $this->get_nextid($account_info['account_type']);
|
||||||
/* echo '<br>using'.$account_id;exit; */
|
/* echo '<br>using'.$account_id;exit; */
|
||||||
|
Loading…
Reference in New Issue
Block a user