Prefixed built in controllers to better avoid conflicts with people's custom code

This commit is contained in:
Sebastiaan Janssen
2013-11-05 12:00:56 +01:00
parent 11c02eba49
commit fed8f51de8
13 changed files with 208 additions and 208 deletions

View File

@@ -0,0 +1,28 @@
using System.Linq;
using System.Web.Mvc;
using umbraco.cms.businesslogic.member;
using Umbraco.Web.Models;
using Umbraco.Web.Mvc;
namespace Umbraco.Web.Controllers
{
public class UmbLoginController : SurfaceController
{
[HttpPost]
public ActionResult HandleLogin([Bind(Prefix="loginModel")]LoginModel model)
{
// TODO: Use new Member API
if (ModelState.IsValid)
{
var m = Member.GetMemberFromLoginNameAndPassword(model.Username, model.Password);
if (m != null)
{
Member.AddMemberToCache(m);
return Redirect("/");
}
}
return CurrentUmbracoPage();
}
}
}