public static ApplicationUser PrepareApplicationUser(this WebMembershipUser webMembershipUser) { return(new ApplicationUser { Id = webMembershipUser.Id, UserName = webMembershipUser.Username, Email = webMembershipUser.Email, IsApproved = webMembershipUser.IsApproved, CreateDate = webMembershipUser.CreationDate, LastLoginDate = webMembershipUser.LastLoginDate, }); }
public static MembershipUser MergeWebMembershipUser(this MembershipUser membership, WebMembershipUser webMembership) { if (membership == null) { return(null); } if (webMembership == null) { return(membership); } membership.Email = webMembership.Email; membership.IsApproved = webMembership.IsApproved; if ((membership.IsLockedOut != webMembership.IsLockedOut) && webMembership.IsLockedOut == false) { membership.UnlockUser(); } return(membership); }