replaced load_ldap_attributes with parent class function call
This commit is contained in:
parent
f681a189c9
commit
b29106b783
|
@ -100,10 +100,13 @@ class baseModule {
|
|||
}
|
||||
|
||||
|
||||
/* This function loads all standard ldap attributes. It is used
|
||||
/**
|
||||
* This function loads all standard LDAP attributes. It is used
|
||||
* by the modules to reduce code
|
||||
*
|
||||
* @param array $attr attribute list
|
||||
*/
|
||||
function load_ldap_attributes($attr) {
|
||||
function load_attributes($attr) {
|
||||
// Load attributes which are displayed
|
||||
$objectClassName = $this->attributes['objectClass'];
|
||||
// unset count entries
|
||||
|
@ -124,6 +127,7 @@ class baseModule {
|
|||
if (in_array($objectClassName[0], $attr['objectClass']))
|
||||
$this->orig['objectClass'] = $objectClassName;
|
||||
else $this->orig['objectClass'] = array();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -114,14 +114,6 @@ class account extends baseModule {
|
|||
return array('attributes');
|
||||
}
|
||||
|
||||
/* This function loads all attributes into the object
|
||||
* $attr is an array as it's retured from ldap_get_attributes
|
||||
*/
|
||||
function load_attributes($attr) {
|
||||
$this->load_ldap_attributes($attr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This function returns an array with 4 entries:
|
||||
* array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr), 'lamdaemon' => array(cmds)), DN2 .... )
|
||||
* DN is the DN to change. It may be possible to change several DNs,
|
||||
|
|
|
@ -314,16 +314,6 @@ class inetOrgPerson extends baseModule {
|
|||
return array('attributes');
|
||||
}
|
||||
|
||||
/* This function loads all attributes into the object
|
||||
* $attr is an array as it's retured from ldap_get_attributes
|
||||
*/
|
||||
function load_attributes($attr) {
|
||||
$this->load_ldap_attributes($attr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* This function returns an array with 4 entries:
|
||||
* array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr), 'lamdaemon' => array(cmds)), DN2 .... )
|
||||
* DN is the DN to change. It may be possible to change several DNs,
|
||||
|
|
|
@ -431,7 +431,7 @@ class posixAccount extends baseModule {
|
|||
* $attr is an array as it's retured from ldap_get_attributes
|
||||
*/
|
||||
function load_attributes($attr) {
|
||||
$this->load_ldap_attributes($attr);
|
||||
parent::load_attributes($attr);
|
||||
|
||||
// get all additional groupmemberships
|
||||
$dn_groups = $_SESSION['cache']->get_cache('memberUid', 'posixGroup', 'group');
|
||||
|
|
|
@ -398,7 +398,7 @@ class posixGroup extends baseModule {
|
|||
* $attr is an array as it's retured from ldap_get_attributes
|
||||
*/
|
||||
function load_attributes($attr) {
|
||||
$this->load_ldap_attributes($attr);
|
||||
parent::load_attributes($attr);
|
||||
// Delete password. We don't want to show an encrypted password because it makes no sense
|
||||
$this->userPassword('');
|
||||
return 0;
|
||||
|
|
|
@ -471,7 +471,7 @@ class sambaAccount extends baseModule {
|
|||
* $attr is an array as it's retured from ldap_get_attributes
|
||||
*/
|
||||
function load_attributes($attr) {
|
||||
$this->load_ldap_attributes($attr);
|
||||
parent::load_attributes($attr);
|
||||
if (strpos($this->attributes['acctFlags'][0], "D")) $this->deactivated = true;
|
||||
if (strpos($this->attributes['acctFlags'][0], "N")) $this->nopwd = true;
|
||||
if (strpos($this->attributes['acctFlags'][0], "X")) $this->noexpire = true;
|
||||
|
|
|
@ -345,15 +345,6 @@ class sambaGroupMapping extends baseModule {
|
|||
}
|
||||
}
|
||||
|
||||
/* This function loads all attributes into the object
|
||||
* $attr is an array as it's retured from ldap_get_attributes
|
||||
*/
|
||||
function load_attributes($attr) {
|
||||
$this->load_ldap_attributes($attr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/** this functin fills the error message array with messages
|
||||
**/
|
||||
function load_Messages() {
|
||||
|
|
|
@ -421,7 +421,7 @@ class sambaSamAccount extends baseModule {
|
|||
* $attr is an array as it's retured from ldap_get_attributes
|
||||
*/
|
||||
function load_attributes($attr) {
|
||||
$this->load_ldap_attributes($attr);
|
||||
parent::load_attributes($attr);
|
||||
if (strpos($this->attributes['sambaAcctFlags'][0], "D")) $this->deactivated = true;
|
||||
if (strpos($this->attributes['sambaAcctFlags'][0], "N")) $this->nopwd = true;
|
||||
if (strpos($this->attributes['sambaAcctFlags'][0], "X")) $this->noexpire = true;
|
||||
|
|
|
@ -237,7 +237,7 @@ class shadowAccount extends baseModule {
|
|||
*/
|
||||
unset($this->attributes['userPassword']);
|
||||
unset($this->orig['userPassword']);
|
||||
$this->load_ldap_attributes($attr);
|
||||
parent::load_attributes($attr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue