From 09866a9384fcbc4949a4763c68498d33401fac35 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 16 May 2011 17:32:32 +0000 Subject: [PATCH] added clear text password for custom scripts --- lam/lib/modules/inetOrgPerson.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 19d5b97c..8da7fb92 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -39,6 +39,7 @@ class inetOrgPerson extends baseModule implements passwordService { /** caches the list of possible managers */ private $cachedManagers = null; + private $clearTextPassword = null; /** * This function fills the message array. @@ -761,6 +762,10 @@ class inetOrgPerson extends baseModule implements passwordService { $return[$this->getAccountContainer()->dn]['modify']['jpegPhoto'] = array(); 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; } @@ -2145,6 +2150,7 @@ class inetOrgPerson extends baseModule implements passwordService { if (!in_array(get_class($this), $modules)) { return array(); } + $this->clearTextPassword = $password; $this->attributes['userPassword'][0] = pwd_hash($password, true, $this->moduleSettings['posixAccount_pwdHash'][0]); return array(); }