martin: server/kolab/kolab/admin/administrator create_administrator.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/administrator
In directory doto:/tmp/cvs-serv3049/kolab/admin/administrator
Modified Files:
Tag: KOLAB_1_0
create_administrator.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_administrator.php
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/admin/administrator/create_administrator.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_administrator.php 27 Apr 2004 18:11:24 -0000 1.6.2.2
+++ create_administrator.php 3 May 2004 16:09:54 -0000 1.6.2.3
@@ -126,7 +126,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;
@@ -209,15 +209,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)));
@@ -245,6 +245,17 @@
$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") {
if (!$errors) {
More information about the commits
mailing list