Reputation: 409
Just trying to echo the role array of the current user to the screen using Kohana 2 and the Auth module.
Upvotes: 0
Views: 1730
Reputation: 5740
If you have the models setup correctly..
$user_id = Auth::instance()->get_user()->id;
$roles = ORM::factory('user', $user_id)->roles;
foreach ($roles as $role)....etc.
Upvotes: 3