But unfortunately I don't believe there is any way to get Role information without creating an extension. However creating XSLT Extensions are super simple now with 4.7 (see Tim's blog post). The function you'd need to return this info is: System.Web.Security.Roles.GetRolesForUser(loginName)
Current UserId and Role
Hi!
Quick question as can't seem to find the answer after lots of searching...
Can I get the current userID and current user Role in xslt without having to create an extension?
Thanks
Bex
Hi Bex,
You can get a lot of the member's properties using umbraco.library:GetCurrentMember() :
But unfortunately I don't believe there is any way to get Role information without creating an extension. However creating XSLT Extensions are super simple now with 4.7 (see Tim's blog post). The function you'd need to return this info is: System.Web.Security.Roles.GetRolesForUser(loginName)
Hope this helps,
Tom
Oh! It looks like uComponents already has an extension for this: GetGroupsByMemberId(Int32)
See: http://ucomponents.codeplex.com/wikipage?title=Members&referringTitle=Documentation
-Tom
Thanks Tom! :) That's brilliant! I knew there was something, I just couldn't find it in the documentation!
is working on a reply...