diff options
| author | Michael <[email protected]> | 2017-04-30 11:34:16 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-04-30 11:34:16 -0400 |
| commit | a1185b8194e0a2bcea77a509179ec2b37ffea002 (patch) | |
| tree | 06b3cb90daa9266d6e9ba40338b9b504b1372cfd /Project-Unite/ACL.cs | |
| parent | 7581a7b2fdacd4325132baf0bec4973092449977 (diff) | |
| download | project-unite-a1185b8194e0a2bcea77a509179ec2b37ffea002.tar.gz project-unite-a1185b8194e0a2bcea77a509179ec2b37ffea002.tar.bz2 project-unite-a1185b8194e0a2bcea77a509179ec2b37ffea002.zip | |
getting and setting of Codepoints
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 6764a20..cc1c511 100644 --- a/Project-Unite/ACL.cs +++ b/Project-Unite/ACL.cs @@ -23,6 +23,15 @@ namespace Project_Unite return hpr.Raw(usr.UnreadNotifications.ToString()); } + internal static ApplicationUser GetUserFromToken(string token) + { + var db = new ApplicationDbContext(); + var t = db.OAuthTokens.FirstOrDefault(x => x.Id == token); + if (t == null) + return null; + return db.Users.FirstOrDefault(x => x.Id == t.UserId); + } + public static IHtmlString NewestUser(this HtmlHelper hpr) { var db = new ApplicationDbContext(); |
