Code

Only allow changing plugin state if posix is enabled or we want to remove the account
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Jan 2007 05:01:46 +0000 (05:01 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Jan 2007 05:01:46 +0000 (05:01 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5522 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc

index 65705cc0b45b59b22af90820617790ffd0aeacfa..a163a7e4af0da4b5a0cb5ae95331f8767ea0acc1 100644 (file)
@@ -327,7 +327,11 @@ class environment extends plugin
 
       /* Do we need to flip is_account state? */
       if (isset($_POST['modify_state'])){
-        $this->is_account= !$this->is_account;
+       
+        /* Onyl change state if we have posixs enabled or we want to remove this account */ 
+        if(!(!$this->parent->by_object['posixAccount']->is_account && !$this->is_account)){
+          $this->is_account= !$this->is_account;
+        }
       }
 
       if(isset($this->parent)){