diff options
author | Michal Čihař <michal@cihar.com> | 2016-04-06 10:45:43 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2016-04-06 10:45:53 +0300 |
commit | c136a747055bd73141517692c4d5e88ef284e7a5 (patch) | |
tree | ff001be84b50a0e817e2a97cc1c09fdb53c275a7 /user_password.php | |
parent | 354a43483852ba9ef97e906fcf3cc97e01f1f0b0 (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.php | 4 |
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(); |