There seem to be more strange things going on with the code. We have made a customer MembershipProvider, based on the AspNetMembershipProvider in 4.6.2. When looking at the latest version of the AspNetMembershipProvider.vb, it claims to be unmodified in most parts according the the comments, but further inspection proves this isn't true. This has us furhter worried that source control might not be all it should be?
An example, if you look at the history for these 2 functions, they should be the same, but when you look into them, you notice they are not.
From 4.6.2:
''' -----------------------------------------------------------------------------
'''
''' DeleteUser deletes a single User from the Data Store
'''
'''
'''
'''
The user to delete from the Data Store.
'''
A Boolean indicating success or failure.
'''
''' [cnurse] 12/13/2005 created
'''
''' -----------------------------------------------------------------------------
Public Overrides Function DeleteUser(ByVal user As UserInfo) As Boolean
Dim retValue As Boolean = True
Dim dr As IDataReader
Try
dr = dataProvider.GetRolesByUser(user.UserID, user.PortalID)
While dr.Read
dataProvider.DeleteUserRole(user.UserID, Convert.ToInt32(dr("RoleId")))
End While
dr.Close()
'check if user exists in any other portal
dr = dataProvider.GetUserByUsername(-1, user.Username)
dr.Read()
If Not dr.Read Then
dataProvider.DeleteUser(user.UserID)
'Delete AspNet MemrshipUser
retValue = DeleteMembershipUser(user)
Else
dataProvider.DeleteUserPortal(user.UserID, user.PortalID)
End If
dr.Close()
Catch ex As Exception
retValue = False
End Try
Return retValue
End Function
From 5.5.1
''' -----------------------------------------------------------------------------
'''
''' DeleteUser deletes a single User from the Data Store
'''
'''
'''
'''
The user to delete from the Data Store.
'''
A Boolean indicating success or failure.
'''
''' [cnurse] 12/13/2005 created
'''
''' -----------------------------------------------------------------------------
Public Overrides Function DeleteUser(ByVal user As UserInfo) As Boolean
Dim retValue As Boolean = True
Dim dr As IDataReader = Nothing
Try
dr = dataProvider.GetRolesByUser(user.UserID, user.PortalID)
While dr.Read
dataProvider.DeleteUserRole(user.UserID, Convert.ToInt32(dr("RoleId")))
End While
dataProvider.DeleteUserPortal(user.UserID, user.PortalID)
Catch ex As Exception
LogException(ex)
retValue = False
Finally
CBO.CloseDataReader(dr, True)
End Try
Return retValue
End Function