Skip to content
Snippets Groups Projects
Commit 0ea96f5f authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #3569

Closes #3569

Merge request studip/studip!2458
parent 73c5eeb4
No related branches found
No related tags found
No related merge requests found
......@@ -282,8 +282,20 @@ class PluginManager
$state = $active ? 1 : 0;
unset($this->plugins_activated_cache[$user_id]);
return $db->execute("REPLACE INTO plugins_activated (pluginid, range_type, range_id, state)
VALUES (?, 'user', ?, ?)", [$pluginid, $user_id, $state]);
$query = "REPLACE INTO plugins_activated (pluginid, range_type, range_id, state)
VALUES (?, 'user', ?, ?)";
$result = $db->execute($query, [$pluginid, $user_id, $state]);
if ($result > 0) {
$plugin = $this->getPluginById($pluginid);
if ($active) {
call_user_func([get_class($plugin), 'onActivation'], $pluginid, $user_id);
} else {
call_user_func([get_class($plugin), 'onDeactivation'], $pluginid, $user_id);
}
}
return $result;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment