⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

How set_relation affects unset_column?



edgarvaldes
  • profile picture
  • Member

Posted 13 May 2014 - 22:08 PM

EDIT: Nevermind, it works now. Just a typo in my code :)

 

 

Hi guys

 

 

I'm having a problem with unset_column()

Grocery CRUD 1.3

 

I need to hide certain columns based on roles (using ion_auth), so I have this:

$my_group = array('admin', 'editor', 'colab');
if (!$this->ion_auth->in_group($my_group))
    {
         $crud->unset_columns( 'A', 'B', 'C', 'D'); 
    }

'A', 'B', and 'C' are unset without problems, but column 'D' is still showing.

The column D data is retrieved with "set_relation" from 2 tables.

 

Why? How set_relation affects unset column?