diff options
| author | Michael <[email protected]> | 2017-04-17 08:30:58 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-04-17 08:30:58 -0400 |
| commit | a9b8092732e2012ffadc552052e2e070cbf380e4 (patch) | |
| tree | 73be56bcba46bddc04bd728e932d438912276d1a /Project-Unite/ACL.cs | |
| parent | c018558559b5454210d301ba693a046a07ea4cae (diff) | |
| download | project-unite-a9b8092732e2012ffadc552052e2e070cbf380e4.tar.gz project-unite-a9b8092732e2012ffadc552052e2e070cbf380e4.tar.bz2 project-unite-a9b8092732e2012ffadc552052e2e070cbf380e4.zip | |
SignalR notifications
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; |
