Mineplex2018-withcommit/Website/LOC.Website.Web/Controllers/ProfileController.cs
Jonathan Williams 3fb52c5c71 Initial Commit
2013-08-27 08:14:08 -07:00

37 lines
859 B
C#

namespace LOC.Website.Web.Controllers
{
using System.Web.Mvc;
using Common;
using Common.Models;
using Core;
using Core.Model.Account;
public class ProfileController : Controller
{
private readonly IAccountAdministrator _accountAdministrator;
public ProfileController(IAccountAdministrator accountAdministrator)
{
_accountAdministrator = accountAdministrator;
}
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult Index(string name)
{
Account account = _accountAdministrator.GetAccountByName(name);
if (account != null)
{
return View(account);
}
return RedirectToAction("Error");
}
public ActionResult Error()
{
return View();
}
}
}