diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index bb684b90d0d1f39e2394b5480c8bbf31ea2a5e8a..6a66a4f6cc7e9f39e6c7904906a8460a25759fa1 100644 (file)
var $accessTo= array();
var $trustModel= "";
var $accessTo= array();
var $trustModel= "";
+ var $glist=array();
var $status= "";
var $loginShellList= array();
var $groupMembership= array();
var $status= "";
var $loginShellList= array();
var $groupMembership= array();
$obj= $this->parent->by_object['sambaAccount'];
}
if (isset($obj) && $obj->is_account == TRUE &&
$obj= $this->parent->by_object['sambaAccount'];
}
if (isset($obj) && $obj->is_account == TRUE &&
- isset($this->parent->by_object['sambaAccount'])){
+ ((isset($this->parent->by_object['sambaAccount']))&&($this->parent->by_object['sambaAccount']->is_account))
+ ||(isset($this->parent->by_object['environment'] ))&&($this->parent->by_object['environment'] ->is_account)){
/* Samba3 dependency on posix accounts are enabled
in the moment, because I need to rely on unique
uidNumbers. There'll be a better solution later
on. */
$display= $this->show_header(_("Remove posix account"),
/* Samba3 dependency on posix accounts are enabled
in the moment, because I need to rely on unique
uidNumbers. There'll be a better solution later
on. */
$display= $this->show_header(_("Remove posix account"),
- _("This account has unix features enabled. To disable them, you'll need to remove the samba account first."), TRUE);
+ _("This account has unix features enabled. To disable them, you'll need to remove the samba / environment account first."), TRUE);
} else {
$display= $this->show_header(_("Remove posix account"),
_("This account has posix features enabled. You can disable them by clicking below."));
} else {
$display= $this->show_header(_("Remove posix account"),
_("This account has posix features enabled. You can disable them by clicking below."));
register_global("groupfilter", $groupfilter);
/* Calculate actual groups */
register_global("groupfilter", $groupfilter);
/* Calculate actual groups */
- $gd->reload();
+ $gd->reload2();
$glist= array();
foreach ($gd->grouplist as $key => $value){
if (!isset($this->groupMembership[$key])){
$glist= array();
foreach ($gd->grouplist as $key => $value){
if (!isset($this->groupMembership[$key])){
}
}
}
}
- /* Show dialog */
$smarty->assign("groups", $glist);
$smarty->assign("search_image", get_template_path('images/search.png'));
$smarty->assign("launchimage", get_template_path('images/small_filter.png'));
$smarty->assign("groups", $glist);
$smarty->assign("search_image", get_template_path('images/search.png'));
$smarty->assign("launchimage", get_template_path('images/small_filter.png'));
/* Save data to LDAP, depending on is_account we save or delete */
function save()
{
/* Save data to LDAP, depending on is_account we save or delete */
function save()
{
+
/* include global link_info */
$ldap= $this->config->get_ldap_link();
/* include global link_info */
$ldap= $this->config->get_ldap_link();
$this->shadowExpire = "";
}
$this->shadowExpire = "";
}
- /* Call parents save to prepare $this->attrs */
- plugin::save();
-
/* Fill gecos */
if (isset($this->parent) && $this->parent != NULL){
/* Fill gecos */
if (isset($this->parent) && $this->parent != NULL){
- $this->gecos= $this->parent->by_object['user']->cn;
+ $this->gecos= rewrite($this->parent->by_object['user']->cn);
+ if (!preg_match('/[a-z0-9 -]/i', $this->gecos)){
+ $this->gecos= "";
+ }
}
}
+ /* Call parents save to prepare $this->attrs */
+ plugin::save();
+
/* Trust accounts */
$objectclasses= array();
foreach ($this->attrs['objectClass'] as $key => $class){
/* Trust accounts */
$objectclasses= array();
foreach ($this->attrs['objectClass'] as $key => $class){
}
}
}
}
+ if(empty($this->attrs['gosaDefaultPrinter'])){
+ $thid->attrs['gosaDefaultPrinter']=array();
+ }
+
+ foreach(array("shadowMin","shadowMax","shadowWarning","shadowInactive") as $attr){
+ $this->attrs[$attr] = (int) $this->attrs[$attr];
+ }
+
/* Save data to LDAP */
$ldap->cd($this->dn);
$ldap->modify($this->attrs);
/* Save data to LDAP */
$ldap->cd($this->dn);
$ldap->modify($this->attrs);
}
}
}
}
- if(empty($this->gosaDefaultPrinter)){
- $message[]= _("You need to specify a valid default printer.");
- }
+ // if(empty($this->gosaDefaultPrinter)){
+ // $message[]= _("You need to specify a valid default printer.");
+ // }
return ($message);
}
return ($message);
}
-
- /* Add posix user to some groups */
function addGroup ($groups)
{
/* include global link_info */
function addGroup ($groups)
{
/* include global link_info */
}
}
+
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+
+
+
+
+
?>
?>