I'm write a class in App_Code that inherits to ApplicationBase. I need to detect the current user (umbraco manager side) logged and its user type. How I can do this?
The ApplicationBase code it executed at application startup, generally used for registering back-office sections, trees and event handlers. There wouldn't actually be a logged in back-office user when your code is ran.
If you can give us a little more background on what you are trying to achieve, we may be able to help.
For sure, once you're in a hooked up event - you can get access the APIs. Doubt it would work from the class constructor (that's inherited from ApplicationBase).
Just the original post didn't mention what they were trying to do.
Detect user type in ApplicationBase class
Hi,
I'm write a class in App_Code that inherits to ApplicationBase. I need to detect the current user (umbraco manager side) logged and its user type. How I can do this?
Tnx
Hi Giuseppe,
The ApplicationBase code it executed at application startup, generally used for registering back-office sections, trees and event handlers. There wouldn't actually be a logged in back-office user when your code is ran.
If you can give us a little more background on what you are trying to achieve, we may be able to help.
Cheers, Lee
Hi,
Actually, I'm pretty sure you can get a reference to the user in some AppBase events, like MasterPageLoadHandler
You can get a reference to the UserType like so:
-Tom
For sure, once you're in a hooked up event - you can get access the APIs. Doubt it would work from the class constructor (that's inherited from ApplicationBase).
Just the original post didn't mention what they were trying to do.
Cheers, Lee.
Thank's guys! I'm able to get it trought
is working on a reply...