diff --git a/src/Umbraco.Web/Security/WebSecurity.cs b/src/Umbraco.Web/Security/WebSecurity.cs index 972644ff49..08f5b0b67a 100644 --- a/src/Umbraco.Web/Security/WebSecurity.cs +++ b/src/Umbraco.Web/Security/WebSecurity.cs @@ -128,7 +128,7 @@ namespace Umbraco.Web.Security SqlHelper.CreateParameter("@contextId", retVal)); UmbracoUserContextId = retVal.ToString(); - LogHelper.Info(typeof(WebSecurity), "User Id: {0} logged in", () => userId); + LogHelper.Info("User Id: {0} logged in", () => userId); } @@ -147,8 +147,11 @@ namespace Umbraco.Web.Security } catch (Exception ex) { - LogHelper.Error(typeof(WebSecurity), string.Format("Login with contextId {0} didn't exist in the database", UmbracoUserContextId), ex); + LogHelper.Error(string.Format("Login with contextId {0} didn't exist in the database", UmbracoUserContextId), ex); } + + //this clears the cookie + UmbracoUserContextId = ""; } public void RenewLoginTimeout()