mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-05 13:00:14 +01:00
modified the ldap class, to know the type of account(u or g)
This commit is contained in:
parent
4c4fcee9cc
commit
3985fe231d
@ -184,7 +184,7 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$group = CreateObject('phpgwapi.accounts',$group_info['account_id']);
|
$group = CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||||
$group->acct_type = 'g';
|
$group->acct_type = 'g';
|
||||||
$account_info = array(
|
$account_info = array(
|
||||||
'account_type' => 'g',
|
'account_type' => 'g',
|
||||||
@ -457,7 +457,7 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$group = CreateObject('phpgwapi.accounts',$group_info['account_id']);
|
$group = CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||||
$old_group_info = $group->read_repository();
|
$old_group_info = $group->read_repository();
|
||||||
|
|
||||||
// Set group apps
|
// Set group apps
|
||||||
@ -634,7 +634,7 @@
|
|||||||
{
|
{
|
||||||
$errors = Array();
|
$errors = Array();
|
||||||
|
|
||||||
$group = CreateObject('phpgwapi.accounts',$group_info['account_id']);
|
$group = CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||||
$group->read_repository();
|
$group->read_repository();
|
||||||
|
|
||||||
if(!$group_info['account_name'])
|
if(!$group_info['account_name'])
|
||||||
@ -760,7 +760,7 @@
|
|||||||
/* stores the userdata */
|
/* stores the userdata */
|
||||||
function save_user($_userData)
|
function save_user($_userData)
|
||||||
{
|
{
|
||||||
$account = CreateObject('phpgwapi.accounts',$_userData['account_id']);
|
$account = CreateObject('phpgwapi.accounts',$_userData['account_id'],'u');
|
||||||
$account->update_data($_userData);
|
$account->update_data($_userData);
|
||||||
$account->save_repository();
|
$account->save_repository();
|
||||||
if ($_userData['account_passwd'])
|
if ($_userData['account_passwd'])
|
||||||
@ -784,7 +784,7 @@
|
|||||||
}
|
}
|
||||||
$apps->save_repository();
|
$apps->save_repository();
|
||||||
|
|
||||||
$account = CreateObject('phpgwapi.accounts',$_userData['account_id']);
|
$account = CreateObject('phpgwapi.accounts',$_userData['account_id'],'u');
|
||||||
$allGroups = $account->get_list('groups');
|
$allGroups = $account->get_list('groups');
|
||||||
|
|
||||||
if ($_userData['account_groups'])
|
if ($_userData['account_groups'])
|
||||||
|
@ -547,7 +547,7 @@
|
|||||||
|
|
||||||
$t->parse('password_fields','form_logininfo',True);
|
$t->parse('password_fields','form_logininfo',True);
|
||||||
|
|
||||||
$account = CreateObject('phpgwapi.accounts',intval($GLOBALS['HTTP_GET_VARS']['account_id']));
|
$account = CreateObject('phpgwapi.accounts',intval($GLOBALS['HTTP_GET_VARS']['account_id']),'u');
|
||||||
$userData = $account->read_repository();
|
$userData = $account->read_repository();
|
||||||
|
|
||||||
$var['account_lid'] = $userData['account_lid'];
|
$var['account_lid'] = $userData['account_lid'];
|
||||||
@ -690,7 +690,7 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$accounts = CreateObject('phpgwapi.accounts',$group_info['account_id']);
|
$accounts = CreateObject('phpgwapi.accounts',$group_info['account_id'],'u');
|
||||||
$account_list = $accounts->get_list('accounts');
|
$account_list = $accounts->get_list('accounts');
|
||||||
$account_num = count($account_list);
|
$account_num = count($account_list);
|
||||||
|
|
||||||
@ -823,7 +823,7 @@
|
|||||||
{
|
{
|
||||||
if($_account_id)
|
if($_account_id)
|
||||||
{
|
{
|
||||||
$account = CreateObject('phpgwapi.accounts',intval($_account_id));
|
$account = CreateObject('phpgwapi.accounts',intval($_account_id),'u');
|
||||||
$userData = $account->read_repository();
|
$userData = $account->read_repository();
|
||||||
$userGroups = $account->membership($_account_id);
|
$userGroups = $account->membership($_account_id);
|
||||||
}
|
}
|
||||||
|
@ -449,6 +449,11 @@
|
|||||||
|
|
||||||
function get_type($accountid = '')
|
function get_type($accountid = '')
|
||||||
{
|
{
|
||||||
|
if (isset($this->account_type))
|
||||||
|
{
|
||||||
|
return $this->account_type;
|
||||||
|
}
|
||||||
|
|
||||||
static $account_type;
|
static $account_type;
|
||||||
|
|
||||||
$account_id = get_account_id($accountid);
|
$account_id = get_account_id($accountid);
|
||||||
@ -463,6 +468,7 @@
|
|||||||
|
|
||||||
if ($allValues[0]['phpgwaccounttype'][0])
|
if ($allValues[0]['phpgwaccounttype'][0])
|
||||||
{
|
{
|
||||||
|
$allValues[0]['phpgwaccounttype'][0];
|
||||||
$account_type[$account_id] = $allValues[0]['phpgwaccounttype'][0];
|
$account_type[$account_id] = $allValues[0]['phpgwaccounttype'][0];
|
||||||
return $account_type[$account_id];
|
return $account_type[$account_id];
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
* This constructor sets the account id, if string is sent, converts to id *
|
* This constructor sets the account id, if string is sent, converts to id *
|
||||||
* I might move this to the accounts_shared if it stays around *
|
* I might move this to the accounts_shared if it stays around *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
function accounts($account_id = '')
|
function accounts($account_id = '', $account_type='')
|
||||||
{
|
{
|
||||||
$this->db = $GLOBALS['phpgw']->db;
|
$this->db = $GLOBALS['phpgw']->db;
|
||||||
|
|
||||||
@ -84,6 +84,11 @@
|
|||||||
$this->account_id = get_account_id($account_id);
|
$this->account_id = get_account_id($account_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($account_type != '')
|
||||||
|
{
|
||||||
|
$this->account_type = $account_type;
|
||||||
|
}
|
||||||
|
|
||||||
if($GLOBALS['phpgw_info']['server']['account_repository'] == 'ldap')
|
if($GLOBALS['phpgw_info']['server']['account_repository'] == 'ldap')
|
||||||
{
|
{
|
||||||
$this->ds = $GLOBALS['phpgw']->common->ldapConnect();
|
$this->ds = $GLOBALS['phpgw']->common->ldapConnect();
|
||||||
|
Loading…
Reference in New Issue
Block a user