Restyle login, change password works

This commit is contained in:
2012-12-22 10:48:34 -05:00
parent f129142dab
commit c1944f6262
54 changed files with 327 additions and 255 deletions
+8 -9
View File
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Web;
using System.Web.Routing;
using System.Web.Security;
using MileageTraker.Web.Context;
@@ -47,7 +46,7 @@ namespace MileageTraker.Web.Membership
{
using (var context = new MileageTrakerContext())
{
var user = context.Users.FirstOrDefault(usr => usr.Username == username);
var user = context.Users.First(usr => usr.Username == username);
user.FirstName = firstName;
user.LastName = lastName;
context.SaveChanges();
@@ -134,18 +133,18 @@ namespace MileageTraker.Web.Membership
return CreateUserAndAccount(userName, password, values, requireConfirmationToken: false);
}
public static string CreateUserAndAccount(string userName, string password, object propertyValues = null,
private static string CreateUserAndAccount(string userName, string password, object propertyValues = null,
bool requireConfirmationToken = false)
{
var codeFirstMembership = System.Web.Security.Membership.Provider as CodeFirstMembershipProvider;
IDictionary<string, object> values = null;
if (propertyValues != null)
{
values = new RouteValueDictionary(propertyValues);
}
//IDictionary<string, object> values = null;
//if (propertyValues != null)
//{
// values = new RouteValueDictionary(propertyValues);
//}
return codeFirstMembership.CreateUserAndAccount(userName, password, requireConfirmationToken, values);
return codeFirstMembership.CreateUserAndAccount(userName, password, requireConfirmationToken);
}
public static List<MembershipUser> FindUsersByEmail(string email, int pageIndex, int pageSize)