diff options
Diffstat (limited to 'Project-Unite/ACL.cs')
| -rw-r--r-- | Project-Unite/ACL.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Project-Unite/ACL.cs b/Project-Unite/ACL.cs index 3bfc524..eb8cf72 100644 --- a/Project-Unite/ACL.cs +++ b/Project-Unite/ACL.cs @@ -62,6 +62,15 @@ namespace Project_Unite return hpr.Raw(builder.ToString()); } + internal static object NotificationCountRaw(string uid) + { + var db = new ApplicationDbContext(); + var usr = db.Users.FirstOrDefault(x => x.Id == uid || x.UserName == uid); + if (usr == null) + return 0; + return usr.UnreadNotifications; + } + public static bool IsUnlisted(string topicId) { return new ApplicationDbContext().ForumTopics.FirstOrDefault(x => x.Id == topicId).IsUnlisted; |
