From 5e41cccf87ea75e4addae9d8e5eb5ed2ff363ce1 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 9 Aug 2002 12:16:29 +0000 Subject: [PATCH] bug 591602 --- ChangeLog | 3 +++ user_details.php3 | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96eaacf69..ab7011ff8 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-08-09 Marc Delisle + * user_details.php3: bug 591602, mysql.user lowercase "password" + 2002-08-09 Robin Johnson * Documentation.html: - Updates for SQL Parser diff --git a/user_details.php3 b/user_details.php3 index 3b8ffa581..f31e8e81d 100644 --- a/user_details.php3 +++ b/user_details.php3 @@ -993,9 +993,16 @@ if (PMA_mysql_error()) { include('./footer.inc.php3'); exit(); } -$result = @PMA_mysql_query('SELECT COUNT(Password) FROM mysql.user'); -$password_field = (($result && PMA_mysql_result($result, 0)) ? 'Password' : 'password'); +// The previous logic did not work if the password field is named "password": +//$result = @PMA_mysql_query('SELECT COUNT(Password) FROM mysql.user'); +//$password_field = (($result && PMA_mysql_result($result, 0)) ? 'Password' : 'password'); +$result = @PMA_mysql_query('Select * from user limit 1'); +if ($result) { +// assumes that the password is always the third field of mysql.user + $field_info = PMA_mysql_fetch_field($result,2); + $password_field = $field_info->name; +} /** * Autocomplete feature of IE kills the "onchange" event handler and it must be