diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc
index 2d27f7c4f50c7a51662ddec92b8a73ea1d7c3e3b..67f6021bca54dadf832fb7c1d0b6b85b90a954c1 100644 (file)
$ldap->cat($this->dn);
$attrs = $ldap->fetch();
$this->passwordChangeForceable =
- in_array('sambaAccount', $attrs['objectClass']) ||
- (in_array('posixAccount', $attrs['objectClass']) && isset($attrs['shadowMax']));
+ in_array_strict('sambaAccount', $attrs['objectClass']) ||
+ (in_array_strict('posixAccount', $attrs['objectClass']) && isset($attrs['shadowMax']));
$smarty->assign("passwordChangeForceable" , $this->passwordChangeForceable);
$smarty->assign("enforcePasswordChange" , $this->enforcePasswordChange);
- // Change cassword
+ // Change password
if(isset($this->force_hash_type[$this->dn])){
if(!change_password ($this->dn, $new_password,0,$this->force_hash_type[$this->dn],'', $message)){
msg_dialog::displayChecks(array($message));
$ldap->cd($this->config->current['BASE']);
$ldap->cat($this->dn);
$attrs = $ldap->fetch();
- $samba = in_array('sambaSamAccount', $attrs['objectClass']);
- $posix = in_array('posixAccount', $attrs['objectClass']);
+ $samba = in_array_strict('sambaSamAccount', $attrs['objectClass']);
+ $posix = in_array_strict('posixAccount', $attrs['objectClass']);
// Update the posix shadow flag...
if($posix){
$smarty->assign("template", array_pop($target));
$smarty->assign("templates", $templates);
$smarty->assign("edit_uid", "");
+ $smarty->assign("allowUidProposalModification", $this->config->get_cfg_value("core","allowUidProposalModification"));
return($smarty->fetch(get_template_path('template.tpl', TRUE)));
// -> See 'templateContinue' for further handling!
$smarty->assign("template", "none");
$smarty->assign("templates", $templates);
$smarty->assign("edit_uid", "");
+ $smarty->assign("allowUidProposalModification", $this->config->get_cfg_value("core","allowUidProposalModification"));
return($smarty->fetch(get_template_path('template.tpl', TRUE)));
// -> See 'templateContinue' for further handling!
$smarty->assign("templates",$templates);
$smarty->assign("got_uid", $this->got_uid);
$smarty->assign("edit_uid",false);
+ $smarty->assign("allowUidProposalModification", $this->config->get_cfg_value("core","allowUidProposalModification"));
return($smarty->fetch(get_template_path('template.tpl', TRUE)));
}
if ($ldap->count () != 0){
msg_dialog::displayChecks(array(msgPool::duplicated(_("Name"))));
+ $smarty->assign("edit_uid", "");
}else{
// Preset uid field by using the idGenerator
$attributes= array('sn' => $this->sn, 'givenName' => $this->givenName);
if ($this->config->get_cfg_value("core","idGenerator") != ""){
- $uids= gen_uids ($this->config->get_cfg_value("core","idGenerator"), $attributes);
- if (count($uids)){
- $smarty->assign("edit_uid", "false");
- $smarty->assign("uids", $uids);
- $this->uid= current($uids);
+ $genStr = $this->config->get_cfg_value("core","idGenerator");
+ $smarty->assign("edit_uid", "");
+ if(!empty($genStr)){
+ $uids= gen_uids($genStr, $attributes);
+ if (count($uids)){
+ $smarty->assign("edit_uid", "false");
+ $smarty->assign("uids", $uids);
+ $this->uid= current($uids);
+ }else{
+ msg_dialog::displayChecks(array(_("Cannot generate a unique id, please specify it manually!")));
+ }
}
} else {
$smarty->assign("edit_uid", "");
$smarty->assign("template", get_post('template'));
}
$smarty->assign("templates",$templates);
+ $smarty->assign("allowUidProposalModification", $this->config->get_cfg_value("core","allowUidProposalModification"));
return($smarty->fetch(get_template_path('template.tpl', TRUE)));
}