confusion

This commit is contained in:
Michael 2017-03-24 15:36:06 -04:00
parent ac2cf7171b
commit c29c136621

View file

@ -17,7 +17,7 @@ public static class ACL
public static IHtmlString NotificationCount(this HtmlHelper hpr, string uid)
{
var db = new ApplicationDbContext();
var usr = db.Users.FirstOrDefault(x => x.Id == uid);
var usr = db.Users.FirstOrDefault(x => x.Id == uid||x.UserName==uid);
if (usr == null)
return hpr.Raw("N/A");
return hpr.Raw(usr.UnreadNotifications.ToString());