martin: server/kolab/kolab/admin/user create_user.php, 1.9.2.7, 1.9.2.8
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/user
In directory doto:/tmp/cvs-serv3049/kolab/admin/user
Modified Files:
Tag: KOLAB_1_0
create_user.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_user.php
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/admin/user/create_user.php,v
retrieving revision 1.9.2.7
retrieving revision 1.9.2.8
diff -u -d -r1.9.2.7 -r1.9.2.8
--- create_user.php 27 Apr 2004 18:11:24 -0000 1.9.2.7
+++ create_user.php 3 May 2004 16:09:55 -0000 1.9.2.8
@@ -96,7 +96,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;
@@ -106,7 +106,7 @@
{
global $attributes;
foreach ($attributes as $attr) {
- if ($attr == 'uid' || $attr == 'mail' || $attr == 'alias') continue;
+ if ($attr == 'uid' || $attr == 'mail' || $attr == 'alias' || $attr == 'userPassword') continue;
if (empty($a[$attr])) $a[$attr] = array(0 => "", 'count' => 1);
}
return $a;
@@ -138,7 +138,7 @@
$comment = array(
'firstname' => 'Required', 'sn_0' => 'Required',
- 'password_0' => 'Required', 'password_1' => 'Required',
+// 'password_0' => 'Required', 'password_1' => 'Required',
'mail_0' => $comment_mail_0,
'visible' => 'check here to make this users address <br> visible in the address book');
@@ -270,15 +270,15 @@
}
}
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)));
@@ -289,6 +289,15 @@
}
if ($action == "firstsave"){
+ if (empty($HTTP_GET_VARS['password_0'])) {
+ $comment['password_0'] = "<span style=\"color:#FF0000\"> Fill in password </span>";
+ missing_input();
+ }
+ if (empty($HTTP_GET_VARS['password_1'])) {
+ $comment['password_1'] = "<span style=\"color:#FF0000\"> Fill in password </span>";
+ missing_input();
+ }
+
if (!empty($HTTP_GET_VARS['mail_0'])){
if (is_unique('mail',$HTTP_GET_VARS['mail_0']) && is_unique('alias',$HTTP_GET_VARS['mail_0'])){
$ldap_object['mail'] = trim(strtolower(urldecode($HTTP_GET_VARS['mail_0'])));
More information about the commits
mailing list