Subversion Repositories ALCASAR

Rev

Rev 1831 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1831 Rev 1838
Line 32... Line 32...
32
				else
32
				else
33
					echo "<b>User $login added to group $new</b><br>\n";
33
					echo "<b>User $login added to group $new</b><br>\n";
34
			}
34
			}
35
		}
35
		}
36
	}
36
	}
-
 
37
	//si l'utilisateur n'appartient a aucun groupe. 
-
 
38
	if (!isset($member_groups) && isset($edited_groups)){
-
 
39
		$new = $edited_groups[0];
-
 
40
		$new = da_sql_escape_string($link,$new);
-
 
41
		$res = da_sql_query($link,$config,
-
 
42
		"INSERT INTO $config[sql_usergroup_table] (groupname,username)
-
 
43
		VALUES ('$new','$login');");
-
 
44
		if (!$res)
-
 
45
			echo "<b>Error while adding user $login to group $login: " . da_sql_error($link,$config) . "</b><br>\n";
-
 
46
		else
-
 
47
			echo "<b>User $login added to group $new</b><br>\n";
-
 
48
	}
37
}
49
}
38
else
50
else
39
	echo "<b>Could not connect to SQL database</b><br>\n";
51
	echo "<b>Could not connect to SQL database</b><br>\n";
40
?>
52
?>