I can't override the controller of com_users
(Joomla 3.4). (I want, if a manager can make user registration on the site after when he loged in.So I want to see the registration form, if I loged in the site.)
If I modify the original file, then it works fine, but I don't want to modify the original file. I tried 2 override plugins for this (MVC override, Override master). These plugins override the file, but after I click the registration button I get the following error message:
Fatal error: Cannot redeclare class UsersController in D:\wamp\www\mysite\components\com_users\controller.php on line 136
It's the same file.
I modified the line class UsersController extends JControllerLegacy
to this class UsersController extends UsersControllerDefault
. Because I read this here.
What is the difference? Why doesn't it work this way? :/