public
class
AuthenticationController : Controller
{
.
public
ActionResult Login()
{
string
oldUserName
=
this
.GetUserName();
string
login
=
Request.Form[
“
login
“
];
string
password
=
Request.Form[
“
password
“
];
if
(
!
String.IsNullOrEmpty(login)
&&
!
String.IsNullOrEmpty(password))
{
var svc
=
new
AspNetAuthenticationService();
bool
isValid
=
svc.IsValidLogin(login, password);
//
log them in
if
(isValid)
{
SetPersonalizationCookie(login, login);
//
migrate the current order
_orderService.MigrateCurrentOrder(oldUserName, login);
return
AuthAndRedirect(login);
}
}
return
View();
}
}