Broken query if using hooks

Signed-off-by: emanuele <emanuele45@gmail.com>
Missing controller from subActions array in membergroups management

Signed-off-by: emanuele <emanuele45@gmail.com>
Missing require_once

Signed-off-by: emanuele <emanuele45@gmail.com>
Missing $db initialization

Signed-off-by: emanuele <emanuele45@gmail.com>
Revert "Missing $db initialization" - to avoid conflicts with Eurich
work

This reverts commit 042886eae8747faeddcac71b9f6451c1134c1bc0.
Merge pull request #501 from emanuele45/quick_fix

Merging (hoping not to break other PRs...)