/// <summary> /// Builds a MembershipUser object from the given data. /// </summary> /// <param name="user">The user.</param> /// <returns></returns> private MembershipUser BuildMemberObject(miniUser user) { const string cDateFormat = "yyyyMMddHHmmss"; DateTime vCreateDate = DateTime.ParseExact(user.CreateDate, cDateFormat, CultureInfo.CurrentCulture); DateTime vLastLoginDate = DateTime.ParseExact(user.LastLoginDate, cDateFormat, CultureInfo.CurrentCulture); return(new MembershipUser("SnitzMembershipProvider", user.Name, (object)user.MemberId, user.Email, null, null, true, false, vCreateDate, vLastLoginDate, vLastLoginDate, DateTime.Now, DateTime.Now)); }
/// <summary> /// Builds a MembershipUser object from the given data. /// </summary> /// <param name="user">The user.</param> /// <returns></returns> /// <remarks>EDIT ON REUSE: User</remarks> private MembershipUser BuildMemberObject(miniUser user) { if (user != null) { DateTime lastLoginDate = DateTime.MinValue; if (user.LastLoginDate.HasValue) { lastLoginDate = user.LastLoginDate.Value; } return(new MembershipUser(this.Name, user.Name, (object)user.MemberId, user.Email, null, null, true, false, user.CreateDate, lastLoginDate, lastLoginDate, DateTime.MinValue, DateTime.MinValue)); } else { return(null); } }
/// <summary> /// Builds a MembershipUser object from the given data. /// </summary> /// <param name="user">The user.</param> /// <returns></returns> /// <remarks>EDIT ON REUSE: User</remarks> private MembershipUser BuildMemberObject(User user) { if (user != null) { //convert User to miniUser and pass into BuildMemberObject. miniUser muu = new miniUser(); muu.CreateDate = user.Created; muu.Email = user.Email; muu.LastLoginDate = user.LastLogin; muu.MemberId = user.UserId; muu.Name = user.Username; return(BuildMemberObject(muu)); } else { return(null); } }
/// <summary> /// Builds a MembershipUser object from the given data. /// </summary> /// <param name="user">The user.</param> /// <returns></returns> /// <remarks>EDIT ON REUSE: User</remarks> private MembershipUser BuildMemberObject(User user) { if (user != null) { //convert User to miniUser and pass into BuildMemberObject. miniUser muu = new miniUser(); muu.CreateDate = user.Created; muu.Email = user.Email; muu.LastLoginDate = user.LastLogin; muu.MemberId = user.UserId; muu.Name = user.Email; return BuildMemberObject(muu); } else { return null; } }
/// <summary> /// Builds a MembershipUser object from the given data. /// </summary> /// <param name="user">The user.</param> /// <returns></returns> /// <remarks>EDIT ON REUSE: User</remarks> private MembershipUser BuildMemberObject(miniUser user) { if (user != null) { DateTime lastLoginDate = DateTime.MinValue; if (user.LastLoginDate.HasValue) { lastLoginDate = user.LastLoginDate.Value; } return new MembershipUser(this.Name, user.Name, (object)user.MemberId, user.Email, null, null, true, false, user.CreateDate, lastLoginDate, lastLoginDate, DateTime.MinValue, DateTime.MinValue); } else { return null; } }