CodePlexProject Hosting for Open Source Software
In a controller, what call should I make to get the name of the current user and what roles he belongs to?
To get the user object that will have user info, you could use Membership.GetUser(). To get the user's actual name, Membership.GetUser().UserName.
To return the list of roles a user is in, see this thread on Stackoverflow:
Although - you might want to use WorkContext.CurrentUser (which accesses the User content item in Orchard) and IRolesService which is an orchard component to inspect the current roles.
Are you sure you want to delete this post? You will not be able to recover it later.
Are you sure you want to delete this thread? You will not be able to recover it later.