summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Project-Unite/ACL.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Project-Unite/ACL.cs b/Project-Unite/ACL.cs
index 36eba6e..39c58de 100644
--- a/Project-Unite/ACL.cs
+++ b/Project-Unite/ACL.cs
@@ -113,7 +113,8 @@ namespace Project_Unite
using(var db = new ApplicationDbContext())
{
var usr = db.Users.Include(x=>x.Roles).FirstOrDefault(x => x.Id == userId);
-
+ if (usr == null)
+ return hpr.Raw("<a href=\"#\">system</a>");
var userRoles = new List<Role>();
foreach (var usrRole in usr.Roles)
{