added clear text password for custom scripts

This commit is contained in:
Roland Gruber 2011-05-16 17:32:32 +00:00
parent 4d550751c9
commit 09866a9384
1 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,7 @@ class inetOrgPerson extends baseModule implements passwordService {
/** caches the list of possible managers */ /** caches the list of possible managers */
private $cachedManagers = null; private $cachedManagers = null;
private $clearTextPassword = null;
/** /**
* This function fills the message array. * This function fills the message array.
@ -761,6 +762,10 @@ class inetOrgPerson extends baseModule implements passwordService {
$return[$this->getAccountContainer()->dn]['modify']['jpegPhoto'] = array(); $return[$this->getAccountContainer()->dn]['modify']['jpegPhoto'] = array();
unset($return[$this->getAccountContainer()->dn]['remove']['jpegPhoto']); unset($return[$this->getAccountContainer()->dn]['remove']['jpegPhoto']);
} }
// add information about clear text password
if ($this->clearTextPassword != null) {
$return[$this->getAccountContainer()->dn]['info']['userPasswordClearText'][0] = $this->clearTextPassword;
}
return $return; return $return;
} }
@ -2145,6 +2150,7 @@ class inetOrgPerson extends baseModule implements passwordService {
if (!in_array(get_class($this), $modules)) { if (!in_array(get_class($this), $modules)) {
return array(); return array();
} }
$this->clearTextPassword = $password;
$this->attributes['userPassword'][0] = pwd_hash($password, true, $this->moduleSettings['posixAccount_pwdHash'][0]); $this->attributes['userPassword'][0] = pwd_hash($password, true, $this->moduleSettings['posixAccount_pwdHash'][0]);
return array(); return array();
} }