|
From: Benjamin C. <bc...@us...> - 2002-01-19 16:09:40
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv32739/admin
Modified Files:
user.php
Log Message:
Cleanup
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- user.php 2001/12/24 21:30:33 1.35
+++ user.php 2002/01/19 16:09:37 1.36
@@ -60,11 +60,14 @@
'$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)");
- }
+ if (isset($_pv['fusergroup']) and is_array($_pv['fusergroup']) and
+ $_pv['fusergroup'][0]) {
+ 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)
@@ -99,7 +102,8 @@
if (!isset($user_groups) or !is_array($user_groups)) {
$user_groups = array();
}
- if (!is_array($_pv['fusergroup']) or !$_pv['fusergroup'][0]) {
+ if (!isset($_pv['fusergroup']) or !is_array($_pv['fusergroup']) or
+ !$_pv['fusergroup'][0]) {
$_pv['fusergroup'] = array();
}
|