fixed loading of account flags

This commit is contained in:
Roland Gruber 2005-09-17 08:54:40 +00:00
parent d0f8af8885
commit adaf8f29ba
2 changed files with 16 additions and 6 deletions

View File

@ -460,9 +460,14 @@ class sambaAccount extends baseModule {
*/
function load_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;
if (is_string($this->attributes['acctFlags'][0])) {
if (strpos($this->attributes['acctFlags'][0], "D")) $this->deactivated = true;
else $this->deactivated = false;
if (strpos($this->attributes['acctFlags'][0], "N")) $this->nopwd = true;
else $this->nopwd = false;
if (strpos($this->attributes['acctFlags'][0], "X")) $this->noexpire = true;
else $this->noexpire = false;
}
return 0;
}

View File

@ -451,9 +451,14 @@ class sambaSamAccount extends baseModule {
*/
function load_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;
if (is_string($this->attributes['sambaAcctFlags'][0])) {
if (strpos($this->attributes['sambaAcctFlags'][0], "D")) $this->deactivated = true;
else $this->deactivated = false;
if (strpos($this->attributes['sambaAcctFlags'][0], "N")) $this->nopwd = true;
else $this->nopwd = false;
if (strpos($this->attributes['sambaAcctFlags'][0], "X")) $this->noexpire = true;
else $this->noexpire = false;
}
return 0;
}