Topic Path: Symbol Reference > Classes > TIdFTP Class > TIdFTP Events > OnNeedAccount Event
TIdFTP.OnNeedAccount Event

Derives Account information for the remote FTP Server.

property OnNeedAccount: TIdNeedAccountEvent;

OnNeedAccount is a TIdNeedAccountEvent property that represents the event handler signalled when account information is required during login for the FTP client. 

OnNeedAccount allows the client to derive the information required to perform the FTP ACCT command during execution of the Login method. OnNeedAccount allows the client determine and set the value for the Account property that is used in the protocol exchange. 

Applications must assign a procedure to the event handler to allow responding to the event notification, and to derive a value for the Account property using session or context information. 

Historically, values in the Account property are a Telnet string identifying the user's account. The command is not necessarily related to the USER command, as some sites may require an account for login and others only for specific access, such as storing files. 

If account information is not required for Login, the response code is 230; and if the account information is needed for a command issued later in the dialogue, the server should return a 332 or 532 reply depending on whether it stores (pending receipt of the Account command) or discards the command, respectively.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.