PMA\libraries\DatabaseInterface::getCurrentUser PHP Méthode

getCurrentUser() public méthode

gets the current user with host
public getCurrentUser ( ) : string
Résultat string the current user i.e. user@host
    public function getCurrentUser()
    {
        if (Util::cacheExists('mysql_cur_user')) {
            return Util::cacheGet('mysql_cur_user');
        }
        $user = $this->fetchValue('SELECT USER();');
        if ($user !== false) {
            Util::cacheSet('mysql_cur_user', $user);
            return Util::cacheGet('mysql_cur_user');
        }
        return '';
    }