Merge pull request #12770 from devenbansod/fix_12769

Fix #12769 : Current user might vary from the actual defined user
This commit is contained in:
Michal Čihař 2016-12-02 11:10:05 +01:00 committed by GitHub
commit b875cf13c5
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ phpMyAdmin - ChangeLog
- issue #12588 ReCaptcha now works without allow_url_fopen
- issue #12699 Show no local storage warning only on settings tab
- issue #12765 Fixed SQL export with newlines
- issue #12769 Edit/Export links are not clickable under Routines tab
4.6.5.1 (2016-11-25)
- issue #12735 Incorrect parameters to escapeString in Node.php

View File

@ -2135,7 +2135,7 @@ class DatabaseInterface
if (Util::cacheExists('mysql_cur_user')) {
return Util::cacheGet('mysql_cur_user');
}
$user = $GLOBALS['dbi']->fetchValue('SELECT USER();');
$user = $GLOBALS['dbi']->fetchValue('SELECT CURRENT_USER();');
if ($user !== false) {
Util::cacheSet('mysql_cur_user', $user);
return Util::cacheGet('mysql_cur_user');