0
votes

In 2SXC, I have a content type and a razor template. In the template, I want to show some content if the user is unauthenticated (not logged in) and then show something else if they are. How would I write this if statement?

1

1 Answers

0
votes

I figured it out.

if (Request.IsAuthenticated) {
    you're logged in
}
else {
    you're not logged in
}