forked from extern/egroupware
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';
|
||||
$account_info = array(
|
||||
'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();
|
||||
|
||||
// Set group apps
|
||||
@ -634,7 +634,7 @@
|
||||
{
|
||||
$errors = Array();
|
||||
|
||||
$group = CreateObject('phpgwapi.accounts',$group_info['account_id']);
|
||||
$group = CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||
$group->read_repository();
|
||||
|
||||
if(!$group_info['account_name'])
|
||||
@ -760,7 +760,7 @@
|
||||
/* stores the 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->save_repository();
|
||||
if ($_userData['account_passwd'])
|
||||
@ -784,7 +784,7 @@
|
||||
}
|
||||
$apps->save_repository();
|
||||
|
||||
$account = CreateObject('phpgwapi.accounts',$_userData['account_id']);
|
||||
$account = CreateObject('phpgwapi.accounts',$_userData['account_id'],'u');
|
||||
$allGroups = $account->get_list('groups');
|
||||
|
||||
if ($_userData['account_groups'])
|
||||
|
@ -547,7 +547,7 @@
|
||||
|
||||
$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();
|
||||
|
||||
$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_num = count($account_list);
|
||||
|
||||
@ -823,7 +823,7 @@
|
||||
{
|
||||
if($_account_id)
|
||||
{
|
||||
$account = CreateObject('phpgwapi.accounts',intval($_account_id));
|
||||
$account = CreateObject('phpgwapi.accounts',intval($_account_id),'u');
|
||||
$userData = $account->read_repository();
|
||||
$userGroups = $account->membership($_account_id);
|
||||
}
|
||||
|
@ -449,6 +449,11 @@
|
||||
|
||||
function get_type($accountid = '')
|
||||
{
|
||||
if (isset($this->account_type))
|
||||
{
|
||||
return $this->account_type;
|
||||
}
|
||||
|
||||
static $account_type;
|
||||
|
||||
$account_id = get_account_id($accountid);
|
||||
@ -463,6 +468,7 @@
|
||||
|
||||
if ($allValues[0]['phpgwaccounttype'][0])
|
||||
{
|
||||
$allValues[0]['phpgwaccounttype'][0];
|
||||
$account_type[$account_id] = $allValues[0]['phpgwaccounttype'][0];
|
||||
return $account_type[$account_id];
|
||||
}
|
||||
|
@ -75,7 +75,7 @@
|
||||
* 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 *
|
||||
\**************************************************************************/
|
||||
function accounts($account_id = '')
|
||||
function accounts($account_id = '', $account_type='')
|
||||
{
|
||||
$this->db = $GLOBALS['phpgw']->db;
|
||||
|
||||
@ -84,6 +84,11 @@
|
||||
$this->account_id = get_account_id($account_id);
|
||||
}
|
||||
|
||||
if($account_type != '')
|
||||
{
|
||||
$this->account_type = $account_type;
|
||||
}
|
||||
|
||||
if($GLOBALS['phpgw_info']['server']['account_repository'] == 'ldap')
|
||||
{
|
||||
$this->ds = $GLOBALS['phpgw']->common->ldapConnect();
|
||||
|
Loading…
Reference in New Issue
Block a user