diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc
index fb3b1b04f91d259e9d63c04423cefc69471d604f..b81be284c3904b0ca47389be2da75143c6580ed7 100644 (file)
$this->config= $config;
/* Configuration is fine, allways */
$this->config= $config;
/* Configuration is fine, allways */
- if($this->config->get_cfg_value("honourIvbbAttributes") == "true"){
+ if($this->config->get_cfg_value("core","honourIvbbAttributes") == "true"){
$this->governmentmode = TRUE;
$this->attributes=array_merge($this->attributes,$this->govattrs);
}
$this->governmentmode = TRUE;
$this->attributes=array_merge($this->attributes,$this->govattrs);
}
}
/* Make hash default to md5 if not set in config */
}
/* Make hash default to md5 if not set in config */
- $hash= $this->config->get_cfg_value("passwordDefaultHash", "crypt/md5");
+ $hash= $this->config->get_cfg_value("core","passwordDefaultHash");
/* Load data from LDAP? */
if ($dn !== NULL){
/* Load data from LDAP? */
if ($dn !== NULL){
/* Prepare password hashes */
if ($this->pw_storage == ""){
/* Prepare password hashes */
if ($this->pw_storage == ""){
- $this->pw_storage= $this->config->get_cfg_value("passwordDefaultHash");
+ $this->pw_storage= $this->config->get_cfg_value("core","passwordDefaultHash");
}
$temp= passwordMethod::get_available_methods();
}
$temp= passwordMethod::get_available_methods();
die ("Could not connect to LDAP server");
}
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
die ("Could not connect to LDAP server");
}
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
- if (function_exists("ldap_set_rebind_proc") && $this->config->get_cfg_value("ldapFollowReferrals") == "true") {
+ if (function_exists("ldap_set_rebind_proc") && $this->config->get_cfg_value("core","ldapFollowReferrals") == "true") {
ldap_set_option($this->cid, LDAP_OPT_REFERRALS, 1);
ldap_set_rebind_proc($ds, array(&$this, "rebind"));
}
ldap_set_option($this->cid, LDAP_OPT_REFERRALS, 1);
ldap_set_rebind_proc($ds, array(&$this, "rebind"));
}
- if($this->config->get_cfg_value("ldapTLS") == "true"){
+ if($this->config->get_cfg_value("core","ldapTLS") == "true"){
ldap_start_tls($ds);
}
if (!($res = @ldap_bind($ds, $this->config->current['ADMIN'],
ldap_start_tls($ds);
}
if (!($res = @ldap_bind($ds, $this->config->current['ADMIN'],
function update_new_dn()
{
// Alternative way to handle DN
function update_new_dn()
{
// Alternative way to handle DN
- $pattern= $this->config->get_cfg_value("accountRDN");
+ $pattern= $this->config->get_cfg_value("user","accountRDN");
if ($pattern != "") {
$rdn= $this->create_initial_rdn($pattern);
$attribute= preg_replace('/=.*$/', '', $rdn);
if ($pattern != "") {
$rdn= $this->create_initial_rdn($pattern);
$attribute= preg_replace('/=.*$/', '', $rdn);
} else {
$pt= "";
} else {
$pt= "";
- if($this->config->get_cfg_value("personalTitleInDN") == "true"){
+ if($this->config->get_cfg_value("core","personalTitleInDN") == "true"){
if(!empty($this->personalTitle)){
$pt = $this->personalTitle." ";
}
if(!empty($this->personalTitle)){
$pt = $this->personalTitle." ";
}
$this->cn= $pt.$this->givenName." ".$this->sn;
/* Permissions for that base? */
$this->cn= $pt.$this->givenName." ".$this->sn;
/* Permissions for that base? */
- if ($this->config->get_cfg_value("accountPrimaryAttribute") == "uid"){
+ if ($this->config->get_cfg_value("core","accountPrimaryAttribute") == "uid"){
$this->new_dn= 'uid='.$this->uid.','.get_people_ou().$this->base;
} else {
/* Don't touch dn, if cn hasn't changed */
$this->new_dn= 'uid='.$this->uid.','.get_people_ou().$this->base;
} else {
/* Don't touch dn, if cn hasn't changed */
if ($this->uid == ""){
$message[]= msgPool::required(_("Login"));
}
if ($this->uid == ""){
$message[]= msgPool::required(_("Login"));
}
- if ($this->config->get_cfg_value("accountPrimaryAttribute") != "uid"){
+ if ($this->config->get_cfg_value("core","accountPrimaryAttribute") != "uid"){
$ldap->cat($this->new_dn);
if ($ldap->count() != 0 && $this->dn != $this->new_dn && $this->dn == 'new'){
$message[]= msgPool::duplicated(_("Name"));
$ldap->cat($this->new_dn);
if ($ldap->count() != 0 && $this->dn != $this->new_dn && $this->dn == 'new'){
$message[]= msgPool::duplicated(_("Name"));
{
$ds= ldap_connect($this->config->current['SERVER']);
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
{
$ds= ldap_connect($this->config->current['SERVER']);
ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
- if (function_exists("ldap_set_rebind_proc") && $this->config->get_cfg_value("ldapFollowReferrals") == "true"){
+ if (function_exists("ldap_set_rebind_proc") && $this->config->get_cfg_value("core","ldapFollowReferrals") == "true"){
ldap_set_option($this->cid, LDAP_OPT_REFERRALS, 1);
ldap_set_rebind_proc($ds, array(&$this, "rebind"));
}
ldap_set_option($this->cid, LDAP_OPT_REFERRALS, 1);
ldap_set_rebind_proc($ds, array(&$this, "rebind"));
}
- if ($this->config->get_cfg_value("ldapTLS") == "true"){
+ if ($this->config->get_cfg_value("core","ldapTLS") == "true"){
ldap_start_tls($ds);
}
ldap_start_tls($ds);
}
"plCategory" => array("users" => array("description" => _("Users"),
"objectClass" => "gosaAccount")),
"plCategory" => array("users" => array("description" => _("Users"),
"objectClass" => "gosaAccount")),
+
+ "plProperties" => array(
+ array(
+ "name" => "accountRDN",
+ "type" => "string",
+ "default" => "",
+ "description" => sprintf(
+ _("The 'accountRDN' option tells GOsa to use a placeholder pattern for generating account RDNs. A pattern can include attribute names prefaced by a % and normal text: %s. This will generate a RDN consisting of cn=.... filled with surname and given name of the edited account. This option disables the use of accountPrimaryAttribute and personalTitleInDn."),
+ "accountRDN=\"cn=%sn %givenName\""),
+ "check" => "gosaProperty::isString",
+ "migrate" => "",
+ "group" => "plugin",
+ "mandatory" => FALSE
+ )
+
+ ),
"plProvidedAcls" => array(
"sn" => _("Surname"),
"plProvidedAcls" => array(
"sn" => _("Surname"),
);
);
- /* Append government attributes if required */
- global $config;
- if($config->get_cfg_value("honourIvbbAttributes") == "true"){
- foreach($govattrs as $attr => $desc){
- $ret["plProvidedAcls"][$attr] = $desc;
- }
- }
+# /* Append government attributes if required */
+# global $config;
+# if($config->get_cfg_value("core","honourIvbbAttributes") == "true"){
+# foreach($govattrs as $attr => $desc){
+# $ret["plProvidedAcls"][$attr] = $desc;
+# }
+# }
return($ret);
}
return($ret);
}