I have my Authentication setup in CakePHP to redirect all users to a dashboard using this function:
function dashboard() {
$group_name = $this->User->Group->field('name', array('id' => $this->Auth->User('group_id')));
$action = $group_name . '/dashboard/';
$this->redirect = array('controller' => 'users', 'action' => $action);
}
My question is what would be the best practice (or resource I can look at) to manage group-specific, and user-specific content within this dashboard
A model method that will fetch all the data you need in a single array with keys named like the view vars you want to use and set it from the controller to the view if you need to fetch different things that are not necessary associated.
If not simply return the data and set it to a view var like this:
By passing the user id you can fetch whatever you need in the model through the associations.