Based on the role of the user i want to change my Layout. I use RBAC with succes, but how to get the role of the loggedin user in the controller (of layout).
Similar to your situation, I needed to just get the current username. I created a custom controller plugin which did the trick. I used this repo to help start me along. I’m sure you can easily insert functions to retrieve a role.