|
From: Benjamin C. <bc...@us...> - 2001-12-13 14:06:49
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv16549/admin
Modified Files:
user.php
Log Message:
Always add new users to the User group
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- user.php 2001/11/22 05:14:33 1.33
+++ user.php 2001/12/13 14:06:45 1.34
@@ -59,11 +59,17 @@
values ($new_user_id, '{$_pv['ffirstname']}', '{$_pv['flastname']}',
'$login', '{$_pv['femail']}', '$mpassword', {$_pv['factive']}, $u, $now,
$u, $now)");
+ // Add to the selected groups
foreach ($_pv['fusergroup'] as $group) {
$q->query("insert into ".TBL_USER_GROUP
." (user_id, group_id, created_by, created_date)
values ('$new_user_id' ,'$group', $u, $now)");
}
+ // And add to the user group
+ $q->query("insert into ".TBL_USER_GROUP.
+ " (user_id, group_id, created_by, created_date)
+ select $new_user_id, group_id, $u, $now from ".TBL_AUTH_GROUP.
+ " where group_name = 'User'");
} else {
if (ENCRYPT_PASS) {
$oldpass = $q->grab_field("select password from ".TBL_AUTH_USER
|