steffen: server/kolab/kolab/admin/user create_user.php,1.18,1.19
cvs at intevation.de
cvs at intevation.de
Fri Apr 23 02:35:45 CEST 2004
Author: steffen
Update of /kolabrepository/server/kolab/kolab/admin/user
In directory doto:/tmp/cvs-serv16919/kolab/kolab/admin/user
Modified Files:
create_user.php
Log Message:
issues 72 (remove quota) and 80 (debug msg)
Index: create_user.php
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/admin/user/create_user.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- create_user.php 22 Apr 2004 13:34:50 -0000 1.18
+++ create_user.php 23 Apr 2004 00:35:43 -0000 1.19
@@ -198,7 +198,7 @@
//$ldap_object = fill_up2($ldap_object);
//ldap_free_result($result);
} else {
- print 'No such entry '.$dn.'!';
+ array_push($errors, "LDAP Error: No such dn: $dn: ".ldap_error($link));
}
}
@@ -243,8 +243,11 @@
if (!empty($_POST['visible']) && $_POST['visible'] == "on")
$visible = true;
else $visible = false;
- if( !empty( $_POST['userquota'] ) ) {
+ if( isset( $_POST['userquota'] ) ) {
$ldap_object['userquota'] = $_POST['userquota'];
+ if( empty( $ldap_object['userquota'] ) ) {
+ $ldap_object['userquota'] = array();
+ }
}
if (!$visible) $dn_add = ",cn=internal";
}
@@ -294,14 +297,21 @@
// firstsave
if (!$errors) {
$dn = "cn=".$ldap_object['cn'].$dn_add.",".$domain_dn;
+ if( $ldap_object['userquota'] == array() ) unset( $ldap_object['userquota'] );
debug("Calling ldap_add with dn=$dn");
- var_dump( $ldap_object );
if ($dn && !ldap_add($link, $dn, $ldap_object))
array_push($errors, "LDAP Error: could not add object $dn ".ldap_error($link));
+ if( !$errors ) {
+ print("<div class=\"maintitle\">New User Created</div>\n");
+ print("<div class=\"maintitle\">Create Another</div>\n");
+ $form->entries['action']['value'] = 'firstsave';
+ $form->outputForm();
+ break;
+ }
} else {
print("<div class=\"maintitle\"> Create New User </div>\n");
$blacklist = array('mail');
- $action = "create";
+ $form->entries['action']['value'] = 'firstsave';
$form->outputForm();
break;
}
More information about the commits
mailing list