mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
ACL profile query bug.
This commit is contained in:
parent
32d02caddf
commit
4654aaea6b
1 changed files with 2 additions and 2 deletions
|
@ -29,8 +29,8 @@ public static IHtmlString UserLink(this HtmlHelper hpr, string userId)
|
|||
{
|
||||
userRoles.Add(db.Roles.FirstOrDefault(r => r.Id == usrRole.RoleId) as Role);
|
||||
}
|
||||
var userRole = userRoles.OrderByDescending(m => m.Priority).First();
|
||||
return hpr.ActionLink(usr.DisplayName, "ViewProfile", "Profiles", new { name = usr.UserName }, new { style = @"color: " + userRole.ColorHex });
|
||||
var userRole = userRoles.OrderByDescending(m => m.Priority).FirstOrDefault();
|
||||
return hpr.ActionLink(usr.DisplayName, "ViewProfile", "Profiles", new { name = usr.UserName }, new { style = userRole == null ? "color:white;" : @"color: " + userRole.ColorHex });
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue