summaryrefslogtreecommitdiff
path: root/Project-Unite/Controllers/ProfilesController.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-23 18:08:20 -0400
committerMichael <[email protected]>2017-03-23 18:08:20 -0400
commit0f2629f0603b3c8f5dddf0747da6916dbf479dc4 (patch)
tree277a286b77ccaead5bd8f948f4eca9c0239ecabb /Project-Unite/Controllers/ProfilesController.cs
parent8330fbc5cb51d359d3716c431d1b4af0d31d4e2c (diff)
downloadproject-unite-0f2629f0603b3c8f5dddf0747da6916dbf479dc4.tar.gz
project-unite-0f2629f0603b3c8f5dddf0747da6916dbf479dc4.tar.bz2
project-unite-0f2629f0603b3c8f5dddf0747da6916dbf479dc4.zip
Profile work.
Diffstat (limited to 'Project-Unite/Controllers/ProfilesController.cs')
-rw-r--r--Project-Unite/Controllers/ProfilesController.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/Project-Unite/Controllers/ProfilesController.cs b/Project-Unite/Controllers/ProfilesController.cs
new file mode 100644
index 0000000..c77afda
--- /dev/null
+++ b/Project-Unite/Controllers/ProfilesController.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+using Project_Unite.Models;
+
+namespace Project_Unite.Controllers
+{
+ [Authorize]
+ public class ProfilesController : Controller
+ {
+ // GET: Profiles
+ public ActionResult Index()
+ {
+ return View();
+ }
+
+ public ActionResult ViewProfile(string id)
+ {
+ var db = new ApplicationDbContext();
+ var user = db.Users.FirstOrDefault(x => x.DisplayName == id);
+ if (user == null)
+ return new HttpStatusCodeResult(404);
+
+ return View(user);
+ }
+ }
+} \ No newline at end of file