Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete server doesn't remove it from configuration file #236

Open
ghost opened this issue May 18, 2021 · 1 comment
Open

Delete server doesn't remove it from configuration file #236

ghost opened this issue May 18, 2021 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented May 18, 2021

When I delete a server from the list, the corresponding section in the config.ini.php file is still present.

@sgiehl
Copy link
Member

sgiehl commented Sep 16, 2021

Hi @tbowan. I'm able to reproduce this one. The server is actually removed from the list of servers in config, but the config section for this server remains. Guess in this method we would need to check, which servers were configured before and also remove the config sections for those that shouldn't exist any longer:

plugin-LoginLdap/Config.php

Lines 284 to 295 in 582d2d4

public static function saveLdapServerConfigs($servers)
{
$serverNames = array();
foreach ($servers as $serverInfo) {
ServerInfo::saveServerConfig($serverInfo, $forceSave = false);
$serverNames[] = $serverInfo['name'];
}
PiwikConfig::getInstance()->LoginLdap['servers']= $serverNames;
PiwikConfig::getInstance()->forceSave();
}

@sgiehl sgiehl added the bug label Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant