Added support for email login #1513

pull/1529/head
tidusjar 7 years ago
parent 96e7805eb9
commit 18be4a89f7

@ -28,7 +28,7 @@
<li id="UserManagement" [routerLinkActive]="['active']"><a [routerLink]="['/usermanagement']"><i class="fa fa-user"></i> User Management</a></li> <li id="UserManagement" [routerLinkActive]="['active']"><a [routerLink]="['/usermanagement']"><i class="fa fa-user"></i> User Management</a></li>
</ul> </ul>
<ul *ngIf="hasRole('Admin') || hasRole('PowerUser')" class="nav navbar-nav"> <ul *ngIf="hasRole('Admin') || hasRole('PowerUser')" class="nav navbar-nav">
<li><a href="https://www.paypal.me/PlexRequestsNet" target="_blank" pTooltip="This is how I convince my wife to let me spend my spare time on Ombi ;)"><i class="fa fa-heart" style="color:red"></i> Donate!</a></li> <li><a href="https://www.paypal.me/PlexRequestsNet" target="_blank" pTooltip="This is how I convince my wife to let me spend my spare time developing Ombi ;)"><i class="fa fa-heart" style="color:red"></i> Donate!</a></li>
</ul> </ul>

@ -53,7 +53,13 @@ namespace Ombi.Controllers
if (user == null) if (user == null)
{ {
return new UnauthorizedResult(); // Could this be an email login?
user = await _userManager.FindByEmailAsync(model.Username);
if (user == null)
{
return new UnauthorizedResult();
}
} }
// Verify Password // Verify Password

Loading…
Cancel
Save