martin: server/kolab/kolab/admin/maintainer create_maintainer.php, 1.6.2.2, 1.6.2.3
cvs at intevation.de
cvs at intevation.de
Mon May 3 18:09:57 CEST 2004
Author: martin
Update of /kolabrepository/server/kolab/kolab/admin/maintainer
In directory doto:/tmp/cvs-serv3049/kolab/admin/maintainer
Modified Files:
Tag: KOLAB_1_0
create_maintainer.php
Log Message:
Martin K.: New version 1.0.20 fixes bug from last release (1.0.15) which dissallowed maintainers and admins to change attributes of users
Index: create_maintainer.php
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/admin/maintainer/create_maintainer.php,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -d -r1.6.2.2 -r1.6.2.3
--- create_maintainer.php 27 Apr 2004 18:11:24 -0000 1.6.2.2
+++ create_maintainer.php 3 May 2004 16:09:55 -0000 1.6.2.3
@@ -100,7 +100,7 @@
$comment = array(
'firstname' => 'Required', 'sn' => 'Required',
- 'password_0' => 'Required', 'password_1' => 'Required',
+ // 'password_0' => 'Required', 'password_1' => 'Required',
'uid' => 'Required' );
function comment ($a)
@@ -114,7 +114,7 @@
{
global $attributes;
foreach ($attributes as $attr) {
- if ($attr == 'uid' || $attr == 'mail') continue;
+ if ($attr == 'uid' || $attr == 'mail' || $attr == 'userPassword') continue;
if (empty($a[$attr])) $a[$attr] = array();
}
return $a;
@@ -198,15 +198,15 @@
if ($action == "save" && !$dn) array_push($errors, "Internal Error: need dn to save");
if (!empty($HTTP_GET_VARS['password_0'])) $password_0 = urldecode($HTTP_GET_VARS['password_0']);
- else {
+ /*else {
$comment['password_0'] = "<span style=\"color:#FF0000\"> Fill in password </span>";
missing_input();
- }
+ }*/
if (!empty($HTTP_GET_VARS['password_1'])) $password_1 = urldecode($HTTP_GET_VARS['password_1']);
- else {
+ /* else {
$comment['password_1'] = "<span style=\"color:#FF0000\"> Fill in password </span>";
missing_input();
- }
+ }*/
if ($password_0 && $password_1) {
if ($password_0 == $password_1) {
$ldap_object['userPassword'] = '{sha}'.base64_encode(pack("H*", sha1($password_0)));
@@ -233,6 +233,16 @@
if (!empty($ldap_object['uid']) && !is_unique('uid', $ldap_object['uid'])) {
$comment['uid'] = "<span style=\"color:#FF0000\"> Error: This uid is already taken by another user </span>";
missing_input();
+ }
+ if ($action == "firstsave") {
+ if (empty($HTTP_GET_VARS['password_0'])) {
+ $comment['password_0'] = "<span style=\"color:#FF0000\"> Passwords do not match </span>";
+ missing_input();
+ }
+ if (empty($HTTP_GET_VARS['password_1'])) {
+ $comment['password_1'] = "<span style=\"color:#FF0000\"> Passwords do not match </span>";
+ missing_input();
+ }
}
if ($action == "save") {
More information about the commits
mailing list