Export (0) Print
Expand All

MembershipProvider.DeleteUser Method

Removes a user from the membership data source.

Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)

public abstract bool DeleteUser (
	string username,
	bool deleteAllRelatedData
)
public abstract boolean DeleteUser (
	String username, 
	boolean deleteAllRelatedData
)
public abstract function DeleteUser (
	username : String, 
	deleteAllRelatedData : boolean
) : boolean
Not applicable.

Parameters

username

The name of the user to delete.

deleteAllRelatedData

true to delete data related to the user from the database; false to leave data related to the user in the database.

Return Value

true if the user was successfully deleted; otherwise, false.

Takes, as input, the name of a user and deletes that user's information from the data source. If deleteAllRelatedData is true, then all user data stored in the database for the Roles, Profile, and WebPart personalization is also deleted.

For an example of a MembershipProvider implementation, see Implementing a Profile Provider.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft