From c7b40c97179e5760b915f4f1dedc8369542aa28d Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Sat, 19 Dec 2015 22:58:52 +0530 Subject: [PATCH] Add a base case for MySQL versions 5.5.0 - 5.5.7 - Might give an error on these versions otherwise Signed-off-by: Deven Bansod --- user_password.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/user_password.php b/user_password.php index 1c64703659..93149947bb 100644 --- a/user_password.php +++ b/user_password.php @@ -156,6 +156,9 @@ function PMA_changePassword($password, $message, $change_password_message) ); } + $sql_query = 'SET password = ' + . (($password == '') ? '\'\'' : $hashing_function . '(\'***\')'); + if ($serverType == 'MySQL' && PMA_MYSQL_INT_VERSION >= 50706 ) { @@ -178,8 +181,7 @@ function PMA_changePassword($password, $message, $change_password_message) } $GLOBALS['dbi']->tryQuery('SET `old_passwords` = ' . $value . ';'); } - $sql_query = 'SET password = ' - . (($password == '') ? '\'\'' : $hashing_function . '(\'***\')'); + PMA_changePassUrlParamsAndSubmitQuery( $username, $hostname, $password, $sql_query, $hashing_function, $orig_auth_plugin