Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

SimpleMembershipProvider.DeleteUser Method

Deletes the specified user account, and optionally deletes all profile data that is related to that user account.

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)
public override bool DeleteUser(
	string username,
	bool deleteAllRelatedData
)

Parameters

username
Type: System.String
The user name.
deleteAllRelatedData
Type: System.Boolean
true to delete profile data that is related to the user, or false to retain data that is related to the user.

Return Value

Type: System.Boolean
true if the user account was deleted; otherwise, false.
ExceptionCondition
ArgumentException

username is null or empty.

This method deletes the entry in the membership account table (by default, webpages_Membership). If deleteAllRelatedData is true, all user data that is stored in the user table is also deleted.

NoteNote:

If the InitializeDatabaseConnection() method has not been called, and if you have configured your site to use the standard ASP.NET membership provider, this method is passed through to the standard membership provider. For more information, see the SimpleMembershipProvider class overview.

  • Medium trust for the immediate caller. This member can be used by partially trusted code.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.