2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Get user's global privileges and some db-specific privileges
8 if (! defined('PHPMYADMIN')) {
12 use PhpMyAdmin\CheckUserPrivileges
;
14 $checkUserPrivileges = new CheckUserPrivileges($GLOBALS['dbi']);
16 list($username, $hostname) = $GLOBALS['dbi']->getCurrentUserAndHost();
17 if ($username === '') { // MySQL is started with --skip-grant-tables
18 $GLOBALS['is_create_db_priv'] = true;
19 $GLOBALS['is_reload_priv'] = true;
20 $GLOBALS['db_to_create'] = '';
21 $GLOBALS['dbs_where_create_table_allowed'] = array('*');
22 $GLOBALS['dbs_to_test'] = false;
23 $GLOBALS['db_priv'] = true;
24 $GLOBALS['col_priv'] = true;
25 $GLOBALS['table_priv'] = true;
26 $GLOBALS['proc_priv'] = true;
28 $checkUserPrivileges->analyseShowGrant();