Skip to content

Commit

Permalink
Merge branch 'main' into snyk-upgrade-dddd15e7bde228afaba277f7459bc842
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinkobit authored Mar 13, 2023
2 parents c0886a3 + f10e07e commit 233b058
Show file tree
Hide file tree
Showing 54 changed files with 5,865 additions and 632 deletions.
1 change: 1 addition & 0 deletions Labtracker/Account/Login.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ protected void LogIn(object sender, EventArgs e)
true);
break;
case SignInStatus.Failure:
break;
default:
FailureText.Text = "Invalid login attempt";
ErrorMessage.Visible = true;
Expand Down
579 changes: 551 additions & 28 deletions Labtracker/Account/Manage.aspx

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion Labtracker/Account/Manage.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
using Microsoft.Owin.Security;
using Owin;
using Labtracker.Models;
using System.Web.Providers.Entities;

namespace Labtracker.Account
{
public partial class Manage : System.Web.UI.Page
{

protected string SuccessMessage
{
get;
Expand All @@ -36,7 +38,7 @@ private bool HasPassword(ApplicationUserManager manager)
protected void Page_Load()
{
var manager = Context.GetOwinContext().GetUserManager<ApplicationUserManager>();

UsernameText.Text = User.Identity.GetUserName();
HasPhoneNumber = String.IsNullOrEmpty(manager.GetPhoneNumber(User.Identity.GetUserId()));

// Enable this after setting up two-factor authentientication
Expand Down Expand Up @@ -124,5 +126,12 @@ protected void TwoFactorEnable_Click(object sender, EventArgs e)

Response.Redirect("/Account/Manage");
}

protected void SignOut(object sender, EventArgs e)
{
var authenticationManager = HttpContext.Current.GetOwinContext().Authentication;
authenticationManager.SignOut();
Response.Redirect("~/login.aspx");
}
}
}
27 changes: 27 additions & 0 deletions Labtracker/Account/Manage.aspx.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 233b058

Please sign in to comment.