steffen: server/kolab/kolab/admin/user create_user.php,1.15,1.16

cvs at intevation.de cvs at intevation.de
Sun Apr 18 04:51:43 CEST 2004


Author: steffen

Update of /kolabrepository/server/kolab/kolab/admin/user
In directory doto:/tmp/cvs-serv17858/kolab/kolab/admin/user

Modified Files:
	create_user.php 
Log Message:
quota stuff

Index: create_user.php
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/admin/user/create_user.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- create_user.php	16 Apr 2004 10:17:28 -0000	1.15
+++ create_user.php	18 Apr 2004 02:51:41 -0000	1.16
@@ -129,6 +129,15 @@
     else $v = $ldap_object[$attr];
     $form->entries[$attr.'_0']['value'] = $v;
   }
+  if( isset( $form->entries['userquota'] ) ) {
+    if (is_array($ldap_object['userquota'])) $userquota = $ldap_object['userquota'][0];
+    else $userquota = $ldap_object['userquota'];
+    if( $userquota > 0 ) {
+      $form->entries['userquota']['value'] = $userquota;
+    } else {
+      $form->entries['userquota']['value'] = '';
+    }
+  }
 }
 
 if ($action == "create") {
@@ -175,6 +184,10 @@
 			     'type' => 'checkbox',
 			     'value' => true,
 			     'comment' => 'check here to make this users address <br> visible in the address book');
+if( $group == "admin" || $group == "maintainer" ) {
+  $entries['userquota'] = array( 'name' => 'User Quota in KB',
+				 'comment' => 'Leave blank for unlimited' );
+}
 $entries['action'] = array( 'name' => 'action',
 			    'type' => 'hidden' );
 
@@ -230,6 +243,9 @@
 	 if (!empty($_POST['visible']) && $_POST['visible'] == "on") 
 	   $visible = true;
 	 else $visible = false;
+	 if( !empty( $_POST['userquota'] ) ) {
+	   $ldap_object['userquota'] = $_POST['userquota'];
+	 }
        }   
        if (!$visible) $dn_add = ",cn=internal";
        else $dn_add = "";





More information about the commits mailing list