Hi,
does anybody know, how to do a permission check in _config.php to load differet database settings depending on the login status?
global $databaseConfig;
if (Member::isInGroup('Administratoren')) {
// temoräre DB
$databaseConfig = array(
"type" => 'MySQLDatabase',
"server" => 'mysql5.xxx.net',
"username" => 'yyy',
"password" => 'yyy',
"database" => 'yyy',
"path" => '',
);
} else {
// orig DB
$databaseConfig = array(
"type" => 'MySQLDatabase',
"server" => 'mysql5.xxx.net',
"username" => 'xxx',
"password" => 'xxx',
"database" => 'xxx',
"path" => '',
);
}
Greetings, Carsten.