6.1.5.6 FindProfilesByUserName
This method retrieves profile information for the specified user name.
Declaration
// C# public override ProfileInfoCollection FindProfilesByUserName (ProfileAuthenticationOption profileAuthenticationOption, string userName, int pageIndex, int pageSize, out int totalRecords);
Parameters
- 
                        profileAuthenticationOptionAnonymous,Authenticated, orAllprofiles to be searched to find active profiles.
- 
                        userNameThe user name to match. 
- 
                        pageIndexThe zero-based index of the results page. 
- 
                        pageSizeThe size of the page of results page. 
- 
                        totalRecordsThe total number of profiles. 
Return Value
A ProfileInfoCollection object that contains user profiles where the user name matches the supplied user name.
                  
Exceptions
ArgumentException - One of the following conditions exists:
                  
- 
                        The userNameparameter is an empty string or exceeds 256 characters.
- 
                        The pageSizeparameter value is less than 1.
- 
                        The pageIndexparameter value is less than 0 orpageIndexmultiplied bypageSizeis larger thanInt32.MaxValue.
ArgumentNullException - The userName parameter is a null reference.
                  
Remarks
This method retrieves profiles from the data source for the application specified by the applicationName attribute in the configuration file. The profileAuthenticationOption parameter specifies whether to search only anonymous profiles, only authenticated profiles, or all profiles. The OracleProfileProvider object searches for a match of the userName parameter supplied using the LIKE keyword and supports wildcard characters using the percent sign(% ).
                  
The results returned by this method are constrained by the pageIndex and pageSize parameters. The pageSize parameter identifies the number of ProfileInfo objects to return in the ProfileInfoCollection object. The pageIndex parameter identifies which results page to return. The totalRecords parameter is an out parameter for the total number of inactive user profiles that matched the userName parameter.