In my environment, I have several different
programmer/dba that need to access different
databases. With a minor change to common.lib.php I
have been able to implement that by giving each user
their own configuration file which provides access to
the specific databases they need.
It gets the logged in username from the server,
removes the domain in the case of Windows, and checks
for a user specific configuration file.
/**
* Detects the config file we want to load
*/
$config_to_load = "./config.inc.php";
$username = @$_SERVER["PHP_AUTH_USER"];
$arr = explode("\\",$username);
$username = end($arr);
if ($username != "") {
if (file_exists('./config_' .
$username . '.inc.php')) {
$config_to_load = './config_' .
$username . '.inc.php';
}
}
$_SESSION['PMA_Config'] = new PMA_Config
($config_to_load);
// $_SESSION['PMA_Config'] = new PMA_Config
('./config.inc.php');
I have made this change to a couple of different
versions and think it may be helpful to others. It
would also eliminate my need to customize with each
update.
Thanks
Logged In: YES
user_id=192186
Wouldn't be better to give them proper MySQL privileges?
Logged In: YES
user_id=1493762
Originator: YES
My configuration files include the database username and password. I need the separate configuration files to supply different login information before that level of security may be enforced. I am using the config auth_type.
For general user configuration, there is option to store settings in database or browser local storage.
For login information, I'd suggest you rather use signon auth type, it seems to be something you need.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).