diff --git a/src/DARE-FrontEnd/Controllers/ProjectController.cs b/src/DARE-FrontEnd/Controllers/ProjectController.cs index c31beab9f..be1290f04 100644 --- a/src/DARE-FrontEnd/Controllers/ProjectController.cs +++ b/src/DARE-FrontEnd/Controllers/ProjectController.cs @@ -41,9 +41,9 @@ private bool IsUserOnProject(Project proj) { return true; } - + //NO CHANGE var usersName = ""; - usersName = (from x in User.Claims where x.Type == "preferred_username" select x.Value).First(); + usersName = (from x in User.Claims where x.Type == "preferred_username" select x.Value).FirstOrDefault(); if (!string.IsNullOrWhiteSpace(usersName) && (from x in proj.Users where x.Name.ToLower().Trim() == usersName.ToLower().Trim() select x).Any()) {