Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Users Namespace / UserRepository Class / CountUsersByNameOrGroup Method / CountUsersByNameOrGroup(String,NameSearchField,Int32,Boolean,Boolean) Method
The search pattern to check against the user table.
The name field to check against the search pattern.
Id of the group to match (pass zero (0) to count users having no group)
If true match is made for search pattern otherwise it is made on group
If true seach will include anonymous users
Version
CountUsersByNameOrGroup(String,NameSearchField,Int32,Boolean,Boolean) Method
Count users that match a particular search pattern.
Syntax

Parameters

searchPattern
The search pattern to check against the user table.
searchField
The name field to check against the search pattern.
groupId
Id of the group to match (pass zero (0) to count users having no group)
searchByName
If true match is made for search pattern otherwise it is made on group
includeAnonymous
If true seach will include anonymous users

Return Value

The number of users that match the search.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also