I've written a custom MembershipProvider
that works really great except one little thing, I'd like to extend the MembershipUser
class a bit.
The default looks like this:
MembershipUser member = new MembershipUser(
providerName: Membership.Provider.Name,
name: db.userName,
providerUserKey: null,
email: db.userEmail,
passwordQuestion: "",
comment: "",
isApproved: true,
isLockedOut: false,
creationDate: db.creationDate,
lastLoginDate: db.lastLoginDate,
lastActivityDate: db.lastActivityDate,
lastPasswordChangedDate: DateTime.Now,
lastLockoutDate: DateTime.Now
);
But I'd like to extend it a bit, something like this:
MembershipUser member = new MembershipUser(
providerName: Membership.Provider.Name,
name: db.userName,
guid: db.userGuid,
company: db.companyName,
companyGuid: db.companyGuid,
whatever: db.whatever,
providerUserKey: null,
email: db.userEmail,
passwordQuestion: "",
comment: "",
isApproved: true,
isLockedOut: false,
creationDate: db.creationDate,
lastLoginDate: db.lastLoginDate,
lastActivityDate: db.lastActivityDate,
lastPasswordChangedDate: DateTime.Now,
lastLockoutDate: DateTime.Now
);
Is there a way to extend the default class?