From 47b946086fb06526f2ffd619776c4491d689d92d Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 9 Dec 2008 18:29:58 +0000 Subject: [PATCH] make all self service settings available in modules --- lam/docs/README.schema.txt | 8 +++++++- lam/docs/devel/upgrade.htm | 11 ++++++++++- lam/lib/baseModule.inc | 2 +- lam/lib/modules/kolabUser.inc | 2 +- lam/lib/modules/posixAccount.inc | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/lam/docs/README.schema.txt b/lam/docs/README.schema.txt index b2b91ae0..bdb47b3c 100644 --- a/lam/docs/README.schema.txt +++ b/lam/docs/README.schema.txt @@ -71,7 +71,13 @@ Source: Part of OpenLDAP installation - 12. DHCP (modules dhcp_settings, ddns, fixed_ip, range) + 12. phpGroupWare (modules phpGroupwareUser, phpGroupwareGroup) + + Schema: phpgroupware.schema + Source: http://www.phpgroupware.org/ + + + 13. DHCP (modules dhcp_settings, ddns, fixed_ip, range) Schema: dhcp.schema Source: docs/schema/dhcp.schema diff --git a/lam/docs/devel/upgrade.htm b/lam/docs/devel/upgrade.htm index 55dc6653..ef79a26f 100644 --- a/lam/docs/devel/upgrade.htm +++ b/lam/docs/devel/upgrade.htm @@ -5,6 +5,7 @@ + @@ -16,7 +17,15 @@
-

Upgrade notes

+

Upgrade notes

+
+

2.4.0 -> 2.5.0

+

Self service

+$selfServiceSettings in class baseModule is now an object of the class selfServiceProfile. This way all profile settings can be read. To access the module settings use $this->selfServiceSettings->moduleSettings.
+
+
+
+

2.2.0 -> 2.3.0

diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index 0575dfbc..1247100f 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -91,7 +91,7 @@ abstract class baseModule { $this->autoAddObjectClasses = true; // load configuration if (isset($_SESSION['config'])) $this->moduleSettings = $_SESSION['config']->get_moduleSettings(); - if (isset($_SESSION['selfServiceProfile'])) $this->selfServiceSettings = $_SESSION['selfServiceProfile']->moduleSettings; + if (isset($_SESSION['selfServiceProfile'])) $this->selfServiceSettings = $_SESSION['selfServiceProfile']; } /** diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc index a378da5a..f99d1270 100644 --- a/lam/lib/modules/kolabUser.inc +++ b/lam/lib/modules/kolabUser.inc @@ -837,7 +837,7 @@ class kolabUser extends baseModule { // delegates if (in_array('kolabDelegate', $fields)) { $delegates = array(); - $sr = @ldap_search($_SESSION['ldapHandle'], escapeDN($this->selfServiceSettings['kolabUser_suffix'][0]), '(&(objectClass=inetOrgPerson)(mail=*))', array('mail')); + $sr = @ldap_search($_SESSION['ldapHandle'], escapeDN($this->selfServiceSettings->moduleSettings['kolabUser_suffix'][0]), '(&(objectClass=inetOrgPerson)(mail=*))', array('mail')); if ($sr) { $result = ldap_get_entries($_SESSION['ldapHandle'], $sr); for ($i = 0; $i < $result['count']; $i++) { diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 424d498a..62a9622d 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -1797,7 +1797,7 @@ class posixAccount extends baseModule { else { $pwdPolicyResult = checkPasswordStrength($_POST['posixAccount_password']); if ($pwdPolicyResult === true) { - $return['mod']['userPassword'][0] = pwd_hash($_POST['posixAccount_password'], true, $this->selfServiceSettings['posixAccount_pwdHash'][0]); + $return['mod']['userPassword'][0] = pwd_hash($_POST['posixAccount_password'], true, $this->selfServiceSettings->moduleSettings['posixAccount_pwdHash'][0]); if (isset($attributes['shadowLastChange'][0])) { $return['mod']['shadowLastChange'][0] = intval(time()/3600/24); }