How can I check in sitecore that the current user is an administrator?
something like:
if(User.Current.Name == "extranet\Admin")
// then do some thing ??
Sitecore.Security.Accounts.User
class has built in property IsAdministrator
:
Sitecore.Context.User.IsAdministrator
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With