Add a new column to table fuel_users. How to display it on list_items

Hi,
As the title, how to display it on list_items or view it on list user in admin control.
On list_items function I was added name of column to select query but it still not display. On edit or create a new user is ok.

Comments

  • edited 3:34PM
    If you look in the fuel/modules/fuel/config/fuel_modules.php file, you'll see the configuration for the fuel users here:
    $config['modules']['users'] = array( 'module_name' => 'Users', 'model_location' => 'fuel', 'model_name' => 'fuel_users_model', 'table_headers' => array( 'id', 'email', 'user_name', 'first_name', 'last_name', 'super_admin', 'active' ),...
    Note the 'table_headers' parameter. This will filter anything returned in the select down to what is specified. You can overwrite this configuration without changing anything in the fuel modules folder by changing your fuel/application/config/MY_fuel_modules.php file by adding the following:
    $config['module_overwrites']['users'] = array('table_headers' => array( 'id', 'email', 'user_name', 'first_name', 'last_name', 'super_admin', 'my_new_field', 'active' ));
  • edited 3:34PM
    Hi,
    I have a short question according to this issue. Is there also a way to change the displayed names of the table headers like in the create view of the module?
  • edited 3:34PM
    Yes. You can use a key=>val array syntax like below:
    $config['module_overwrites']['users'] = array('table_headers' => array( 'id', 'email' => 'Email Address', 'user_name' => 'User ID', 'first_name', 'last_name', 'super_admin', 'my_new_field', 'active' ));
  • edited 3:34PM
    Hi,
    another question :-)
    I have used the table_headers attribute to manipulate the list view. Now the edit and delete buttons are missing and the row isn't selectable any more. How can I get this buttons back?
    KR
    Habib
  • edited 3:34PM
    Are you logged in as the super_admin role and/or is the module set to just be readonly in the config?
Sign In or Register to comment.