Jump to content


How set_relation affects unset_column?


  • Please log in to reply
No replies to this topic

#1 edgarvaldes

edgarvaldes

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 13 May 2014 - 10: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?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users