Indy 9
TIdUserAccounts
Hierarchy, Properties, Methods, See Also, Unit: IdUserAccounts
Implements a container for user accounts maintained by a user manager.
TIdUserAccounts = class(TOwnedCollection)
Unit
IdUserAccounts
Description
TIdUserAccounts is a TOwnedCollection descendant that implements a container for TIdUserAccount items maintained for the TIdUserManager in a server implementation.

TIdUserAccounts extends the ancestor to provide indexed access to object instances in Items using the Username for the account, and reintroduces the Add method for creating new TIdUserAccount instances to be stored in Items.

TIdUserAccounts also includes properties that indicate if case sensitivity is required when accessing Username or Password properties in the TIdUserAccount instances in Items or UserNames.

TIdUserAccounts is the type used to represent the TIdUserManager.Accounts property.


TIdUserAccounts.CaseSensitivePasswords
TIdUserAccounts
Indicates case is significant when verifying passwords for user accounts.
property CaseSensitivePasswords: Boolean;
Description
CaseSensitivePasswords is a Boolean property that indicates if case is significant when verifying the authentication credentials against the Password stored in a user account. When CaseSensitivePasswords is True, case is significant. When CaseSensitivePasswords is False, case is not significant.

Use CaseSensitiveUsernames to indicate if case is significant when accessing user accounts by the identity for the user account.


TIdUserAccounts.CaseSensitiveUsernames
TIdUserAccounts
Indicates if case is significant when accessing user accounts by user name.
property CaseSensitiveUsernames: Boolean;
Description
CaseSensitiveUsernames is a Boolean property that indicates if case is significant when accessing user accounts in the collection using UserNames.

When CaseSensitiveUsernames is True, the read access specifier for the UserNames property will consider case to be significant in comparing the user name values. When CaseSensitiveUsernames is False, AnsiSameText is used to perform the name comparison.

Use CaseSensitivePasswords to indicate if caser is significant when verifying user account credentials in the collection.


TIdUserAccounts.Items
TIdUserAccounts
Provides access to user accounts by their position in the collection.
property Items [const AIndex: Integer]: TIdUserAccount;
Parameters
AIndex
Position of the item in the collection.
Return Value
TIdUserAccount - User account at the given position in the collection.
Description
Items is an indexed TIdUserAccount property that provides access to user accounts in the collection by the integer position specified in AIndex.

Items provides a read access specifier to insure that the collection item is a TIdUserAccount object instance. Items provides a write access specifier to store a user account at the specified integer position in the collection.

Use UserNames to access user accounts in the collection using the value for the UserName property.


TIdUserAccounts.UserNames
TIdUserAccounts
Provides indexed access to accounts by user name.
property UserNames [const AUserName: String]: TIdUserAccount;
Parameters
Index
User name for the account to be located in the collection.
Return Value
TIdUserAccount - Account whose UserName matches the index value, or Nil.
Description
UserNames is a read-only TIdUserAccount property that provides indexed access to the user account object instances maintained in the Items property. The index specifier is a String that is compared to the TIdUserAccount.UserName property to locate a specific object instance.

When CaseSensitiveUsernames is True, the read access specifier for the property will consider case to be significant in comparing the user name values. When CaseSensitiveUsernames is False, AnsiSameText is used to perform the name comparison.

The return value for the property will be Nil when a user account cannot be located having the specified index value.

Use Items to access user accounts by their integer position in the collection.

Use Add to create a new user account in the collection.


TIdUserAccounts.Add
TIdUserAccounts, See Also
Creates new user account object instances in the collection.
function Add: TIdUserAccount; reintroduce;
Return Value
TIdUserAccount - User account added to the collection.
Description
Add is a TIdUserAccount function, reintroduced in TIdUserAccounts, that allows creation of new user account object instances in the collection. Add calls the inherited Add method, and casts the return value to a TIdUserAccount object instance.

TIdUserAccounts.Create
TIdUserAccounts
Constructor for the object instance.
constructor Create(AOwner: TIdUserManager);
Parameters
AOwner: TIdUserManager
Owner of the object instance.
Description
Create is the constructor for the object instance. Create calls the inherited Create method using AOwner as the owner of the object instance and TIdUserAccount as the ItemClass for the collection.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.