public void OnAuthenticateRequest(object sender, EventArgs e)
{
HttpCookie cookie = Request.Cookies.Get(FormsAuthentication.FormsCookieName );
if (cookie == null)
return;
int id = GetUserId(cookie);
Models.User current = Models.User.TryFind(id);
if (current == null)
{
//This means that we've a cookie for a user that has been removed, we'll
//remove the cookie and redirect to the default page, if the user will
//try to log in again, they will get the usual message, and then it is
//the IT problem.
RemoveAuthCookieAndRedirectToDefaultPage();
}
Context.User = current;
}
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ CastleProject-users mailing list CastleProject-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/castleproject-users