I have work function:
public function index()
{
$this->set('tables', $this->Table->find('all'));
}
But how show only column WHERE owner = logged user?
I have work function:
public function index()
{
$this->set('tables', $this->Table->find('all'));
}
But how show only column WHERE owner = logged user?
You want to do something like this where $this->Session->read() returns the current authenticated user:-
$this->Table->find(
'all',
array(
'conditions' => array('Table.user_id' => $this->Session->read("Auth.User.id"))
)
);
array after the conditions index.