Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2016-04-06 10:45:43 +0300
committerMichal Čihař <michal@cihar.com>2016-04-06 10:45:53 +0300
commitc136a747055bd73141517692c4d5e88ef284e7a5 (patch)
treeff001be84b50a0e817e2a97cc1c09fdb53c275a7 /user_password.php
parent354a43483852ba9ef97e906fcf3cc97e01f1f0b0 (diff)
Cache current user information for DBI lifetime
We query this information quite often, so it makes sense to fetch it only once from the MySQL server. Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'user_password.php')
-rw-r--r--user_password.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/user_password.php b/user_password.php
index b6d9445459..e9764e86f5 100644
--- a/user_password.php
+++ b/user_password.php
@@ -141,9 +141,7 @@ function PMA_changePassword($password, $message, $change_password_message)
$hashing_function = PMA_changePassHashingFunction();
- $row = $GLOBALS['dbi']->fetchSingleRow('SELECT CURRENT_USER() as user');
- $curr_user = $row['user'];
- list($username, $hostname) = explode('@', $curr_user);
+ list($username, $hostname) = $GLOBALS['dbi']->getCurrentUserAndHost();
$serverType = PMA\libraries\Util::getServerType();