How to override the class UserSearchDefaultColumnSet - possible bug?
Permalink
Hi there. I'm fairly new to Concrete5. I am quite heavily extending the User management in Concrete5 (or trying to) and one of the requirements I have is to hide the "Username" column on /dashboard/users/search/.
I am using Concrete 5.6.1.2. I have learnt that since 5.6, overrides work differently to what they used to - but it appears that it is now impossible to override classes that aren't prefixed, in my instance, with "Concrete5_Model_".
Here's what I tried;
In /concrete/core/models/user_list.php I copied;
and put it inside a new file /models/user_list.php, renaming it to;
This works fine, but when I try to copy the following class from /concrete/core/models/user_list.php;
into /models/user_list.php like so;
It gives an error about the file not existing. I have even tried copying the class name/extend word for word but it gives a "cannot redeclare" error. I have tried all sorts to get it to work.
Does anyone know how to do it, or is this a bug and can't be done? Will I just need to modify the core (I was hoping not to)?
Cheers
James
I am using Concrete 5.6.1.2. I have learnt that since 5.6, overrides work differently to what they used to - but it appears that it is now impossible to override classes that aren't prefixed, in my instance, with "Concrete5_Model_".
Here's what I tried;
In /concrete/core/models/user_list.php I copied;
class Concrete5_Model_UserList extends DatabaseItemList
and put it inside a new file /models/user_list.php, renaming it to;
class UserList extends Concrete5_Model_UserList
This works fine, but when I try to copy the following class from /concrete/core/models/user_list.php;
class UserSearchDefaultColumnSet extends DatabaseItemListColumnSet
into /models/user_list.php like so;
class UserSearchDefaultColumnSet extends Concrete5_Model_UserSearchDefaultColumnSet
It gives an error about the file not existing. I have even tried copying the class name/extend word for word but it gives a "cannot redeclare" error. I have tried all sorts to get it to work.
Does anyone know how to do it, or is this a bug and can't be done? Will I just need to modify the core (I was hoping not to)?
Cheers
James