コード例 #1
0
 public ActionResult Logout()
 {
     using (new Tracer())
     {
         FormsAuthentication.SignOut();
         WebSecurity.Logout();
         UserProfile.ClearCurrentVisitor();
         return(Redirect(WebRequestContext.Localization.GetBaseUrl()));
     }
 }
コード例 #2
0
        public override bool ValidateUser(string username, string password)
        {
            UserProfile userProfile = UserProfileFactory.GetUserProfile(username);

            if (userProfile != null && userProfile.VerifyPassword(password))
            {
                userProfile.SetAsCurrentVisitor();
                return(true);
            }
            UserProfile.ClearCurrentVisitor();
            return(false);
        }