Mineplex2018-withcommit/Website/Nautilus.Web.Impulse/Controllers/ProfileController.cs

37 lines
859 B
C#
Raw Normal View History

2013-08-27 17:14:08 +02:00
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();
}
}
}