make all self service settings available in modules

This commit is contained in:
Roland Gruber 2008-12-09 18:29:58 +00:00
parent 3282a234bb
commit 47b946086f
5 changed files with 20 additions and 5 deletions

View File

@ -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

View File

@ -13,10 +13,19 @@
<link rel="stylesheet" type="text/css" href="style/layout.css">
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico"></head><body>
<div style="text-align: center;">
<h1>Upgrade notes</h1></div>
<h1>Upgrade notes</h1>
<div style="text-align: left;">
<h2>2.4.0 -&gt; 2.5.0</h2>
<h3>Self service</h3>
<span style="font-weight: bold;">$selfServiceSettings</span> in class <span style="font-style: italic;">baseModule</span> is now an object of the class <span style="font-style: italic;">selfServiceProfile.</span> This way all profile settings can be read. To access the module settings use <span style="font-weight: bold;">$this-&gt;selfServiceSettings-&gt;moduleSettings</span>.<br>
</div>
<br>
<br>
</div>
<h2>2.2.0 -&gt; 2.3.0</h2>

View File

@ -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'];
}
/**

View File

@ -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++) {

View File

@ -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);
}