how to check on public part of site is it admin logged

Topics: Developer Forum, Project Management Forum, User Forum
Oct 16, 2008 at 10:22 AM
Hi all!

i have a situation that I need to know is admin logged. Basic idea is that only logged administrator can see pages, and if some visitor is no admin, i want to redirect to some static page
on site. Is this possible?
Oct 16, 2008 at 12:23 PM
you can validate the username with
   HttpContext.Current.User.Identity.Name == "admin"

or the group with
Oct 16, 2008 at 1:09 PM
yes, this is what i need. thanks.