If I am setting the Post model in my controller as follows;
$this->Post->id = $id;
Can I access the data from Post or do I have to perform execute;
$this->Post->read()
I’d like to perform some further validation on Post to determine the logic which is being executed.
e.g. If the Post[‘submitted_by’] = $this->Auth->user(‘role’) == ‘admin’) “pseudo code”
Try This code :