Share via


GetUniqueUsers Method

The GetUniqueUsers method of the SPAlertCollection class returns a string array that lists all the users of a site, without listing them more than once, who receive alerts for list items.

Warning  While this feature is still supported in the current product version, it may be removed in the future. If you write new applications, avoid using this deprecated feature. If you modify existing applications, you are strongly encouraged to remove any dependency on this feature.

Return Value

A string array that contains the user name for each user.

Example

The following code example shows how to return and display a list of all users who have alerts on a site.

This example requires using directives (Imports in Visual Basic) for the Microsoft.SharePoint, Microsoft.SharePoint.Utilities, and Microsoft.SharePoint.WebControls namespaces.

The example assumes the existence of a .aspx page that contains a label control.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security