change user group membership by changing membership in this group list.
* On group creation, if member list is empty report that, not that the group was created.
* In the show groups page, note that we only show groups with members
+* In lib/sql/group_info.php3 only unset variables if we need to. In lib/sql/defaults.php3 don't run for groups
+ only for users
Ver 1.72:
* Move the xlat function to a separate file in lib/xlat.php3
* Add a lib/sql/nas_list.php3 to also get the nas list from sql (naslist.conf still works)
<?php
require('../lib/sql/attrmap.php3');
-if ($login != ''){
+if ($login != '' && $user_type != 'group'){
if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php3"))
include_once("../lib/sql/drivers/$config[sql_type]/functions.php3");
else{
$use_op = 0;
}
$group_exists = 'no';
-unset($item_vals);
-unset($tmp);
-unset($group_members);
-unset($existing_groups);
$link = @da_sql_pconnect($config);
if ($link){
if ($login == ''){
+ unset($existing_groups);
+
$res = @da_sql_query($link,$config,
"SELECT COUNT(*) as counter,groupname FROM $config[sql_usergroup_table]
GROUP BY groupname;");
echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
}
else{
+ unset($item_vals);
+ unset($tmp);
+ unset($group_members);
+ unset($existing_groups);
+
$res = @da_sql_query($link,$config,
"SELECT attribute,value $op FROM $config[sql_groupcheck_table] WHERE groupname = '$login';");
if ($res){