ikamiksok wrote: |
|
Any experts can comment on why we could not modify these membership fields? Any problems with the issues mikez brought up? I'd like to see an answer on this as a user import is important to a lot of ppl. I'd like to see this is mikez's new version and so would like someone to provide some expert analysis. Anyone?
userObj.Membership.LastLoginDate userObj.Membership.CreatedDate
|
|
Looking at the stripped down membership provider supplied by the core team and MS, the CreateUser method of the membership class does not take those parameters as arguments. The stored procedure that creates the membership profile DOES include those parameters.
IF (@CreateDate IS NULL)
EXEC dbo.aspnet_GetUtcDate @TimeZoneAdjustment, @CreateDate OUTPUT
ELSE
SELECT @CreateDate = DATEADD(n, -@TimeZoneAdjustment, @CreateDate) -- switch TO UTC time
The largest overload I see in the object browser is the one below. I haven't tried it yet, but you may be able to implement the provider and overload it with the other parameters. If I get time I will test it and see. I think I am about to help Steve on enhancing the Windows Authentication module (to hopefully get included in the core). I am sure I will know more as we start working on that.
Public Shared Function CreateUser(ByVal username As String, ByVal password As String, ByVal email As String, ByVal passwordQuestion As String, ByVal passwordAnswer As String, ByVal isApproved As Boolean, ByVal providerUserKey As Object, ByRef status As Microsoft.ScalableHosting.Security.MembershipCreateStatus) As Microsoft.ScalableHosting.Security.MembershipUser
Wallew