⚠ 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

display table based on user session



HasanB
  • profile picture
  • Member

Posted 27 December 2020 - 09:44 AM

i'm newbie using gc enterprise,

 

anyone can tell me how to show data table based on user login,

 

thanks !


HasanB
  • profile picture
  • Member

Posted 28 December 2020 - 21:10 PM

I'm using Grocery CRUD Enterprise v. 2.8.7

 

i want make the table show based on user login, i made something like below on Custom Model. it worked in 1 user. how to make it dinamically ?

 

 

<?php 
// include(APPPATH . 'Libraries/GroceryCrudEnterprise/autoload.php');
use GroceryCrud\Core\Model;

class customModel extends Model {
    
    
    public function extraWhereStatements($select)
    {
        
        $username = '9';
        $select->where("username = $username");
        return $select;
    }

}