diff --git a/phpgwapi/inc/class.accounts_ldap_wip.inc.php b/phpgwapi/inc/class.accounts_ldap_wip.inc.php index e9a65d142f..6181a1229f 100644 --- a/phpgwapi/inc/class.accounts_ldap_wip.inc.php +++ b/phpgwapi/inc/class.accounts_ldap_wip.inc.php @@ -294,8 +294,12 @@ } } - function isin_array($needle,$haystack=array()) - { + function isin_array($needle,$haystack='') + { + if(gettype($haystack) != 'array') + { + return False; + } for($i=0;$icommon->ldapConnect(); - $acct_type = $this->acct_type; + $acct_type = $this->get_type($account_id); if ($acct_type == 'g' && $phpgw_info['server']['ldap_group_context']) { @@ -537,16 +541,16 @@ $this->acct_type = $account_type; /* echo '
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']); /* echo '
using'.$account_id;exit; */ } + else + { + $account_id = $account_info['account_id']; + } $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['phpgwaccountexpires'] = $account_info['account_expires']; @@ -673,6 +677,11 @@ $entry['objectclass'][5] = 'shadowAccount'; $entry['objectclass'][5] = 'phpgwAccount'; } + /* + echo '
';
+				var_dump($entry);
+				echo '
'; + */ ldap_add($ds, $dn, $entry); } diff --git a/phpgwapi/inc/class.accounts_sql_wip.inc.php b/phpgwapi/inc/class.accounts_sql_wip.inc.php index e12943d0a0..2cc71833ae 100644 --- a/phpgwapi/inc/class.accounts_sql_wip.inc.php +++ b/phpgwapi/inc/class.accounts_sql_wip.inc.php @@ -254,7 +254,7 @@ 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']); /* echo '
using'.$account_id;exit; */