Well, because of performance issues (we have a big amount of data into piwik database), we would like to avoid users setting their default to custom ranges into userSettings module.
I’m diving int UsersManager Plugin, userSettings action, I’ve discovered getAvailableDefaultDates(). The problem is a protected function.
My idea would be writing a plugin hooking to controller.action APIs (UsersManager.userSettings) removing ranged values from the array but I have no idea how to hook into it. Any advice is welcome.
/** * Returns the enabled dates that users can select, * in their User Settings page "Report date to load by default" * * @throws * @return array */ protected function getAvailableDefaultDates()