From 4519fccd25c4f643e06c1b98ab51d63f46a831a5 Mon Sep 17 00:00:00 2001
From: Alan Garcia
Date: Thu, 31 Jan 2013 16:49:16 +0000
Subject: [PATCH] Remonte mieux l'erreur si l'utilisateur SQL existe pas
---
bureau/admin/sql_users_password.php | 2 +-
bureau/admin/sql_users_rights.php | 12 ++++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/bureau/admin/sql_users_password.php b/bureau/admin/sql_users_password.php
index d31da416..977ac03b 100644
--- a/bureau/admin/sql_users_password.php
+++ b/bureau/admin/sql_users_password.php
@@ -41,7 +41,7 @@ getFields($fields);
get_user_dblist($id);
if (!$r) {
- $error=_("This user doesn't exist");
+ $error=$err->errstr();
}
if (! empty($error) ) {
diff --git a/bureau/admin/sql_users_rights.php b/bureau/admin/sql_users_rights.php
index cb84d479..685c3478 100644
--- a/bureau/admin/sql_users_rights.php
+++ b/bureau/admin/sql_users_rights.php
@@ -34,15 +34,19 @@ $fields = array (
"id" => array ("request", "string", ""),
);
getFields($fields);
-
-$r=$mysql->get_user_dblist($id);
?>
$error
";
+$r=$mysql->get_user_dblist($id);
+if (!$r) {
+ $error=$err->errstr();
+}
+
+if (!empty($error)) {
+ echo "$error
";
+ require_once('foot.php');
}
if ($r) {