Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to membership module due to cast error when using JWT auth #3881

Merged
merged 3 commits into from
Jun 30, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
And better still
  • Loading branch information
donker committed Jun 30, 2020
commit 16c83ceedbb2eeefd4057d68e6548ae6c615086e
4 changes: 2 additions & 2 deletions DNN Platform/HttpModules/Membership/MembershipModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ private static bool RequireLogout(HttpContextBase context, UserInfo user)

// if user's password changed after the user cookie created, then force user to login again.
DateTime? issueDate = null;
if (context.User.Identity is FormsIdentity)
if (context.User.Identity is FormsIdentity formsIdentity)
{
issueDate = ((FormsIdentity)context.User.Identity)?.Ticket.IssueDate;
issueDate = formsIdentity.Ticket.IssueDate;
}

return !Null.IsNull(issueDate) && issueDate < user.Membership.LastPasswordChangeDate;
Expand Down