mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-20 16:42:59 +02:00
- bug fixed : when trying to link a blank user to a group, only a french
hard coded message was displayed and a wrong SQL query was executed git-svn-id: http://piwigo.org/svn/trunk@704 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
+15
-8
@@ -84,14 +84,21 @@ elseif ( isset( $_POST['new'] ) )
|
||||
elseif ( isset( $_POST['add'] ) )
|
||||
{
|
||||
$userdata = getuserdata($_POST['username']);
|
||||
if (!$userdata) echo "Utilisateur inexistant";
|
||||
|
||||
// create a new association between the user and a group
|
||||
$query = 'INSERT INTO '.USER_GROUP_TABLE;
|
||||
$query.= ' (user_id,group_id) VALUES';
|
||||
$query.= ' ('.$userdata['id'].','.$_POST['edit_group_id'].')';
|
||||
$query.= ';';
|
||||
pwg_query( $query );
|
||||
if (!$userdata)
|
||||
{
|
||||
array_push($error, $lang['user_err_unknown']);
|
||||
}
|
||||
else
|
||||
{
|
||||
// create a new association between the user and a group
|
||||
$query = '
|
||||
INSERT INTO '.USER_GROUP_TABLE.'
|
||||
(user_id,group_id)
|
||||
VALUES
|
||||
('.$userdata['id'].','.$_POST['edit_group_id'].')
|
||||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
}
|
||||
elseif (isset( $_POST['deny_user'] ))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user