Internet Direct (Indy) Version 9.0.2 Beta
TIdFTPServer.OnUserLogin
Allows the server to perform user account authentication for a client connection.

property OnUserLogin: TOnUserLoginEvent;
Description
OnUserLogin is a TOnUserLoginEvent property that represents the event handler signalled when the FTP server needs to perform authentication for a threaded client connection. OnUserLogin is triggered when the command event handlers for the FTP USER and PASS command verbs have been executed.

OnUserLogin allows the server to perform authentication for the user account using the AUsername and APassword values supplied by the threaded client connection. OnUserLogin is used when the value in TIdFTPServerThread.UserType is utNormalUser, and UserAccounts have not been assigned for authenticating accounts in the server implementation.

OnUserLogin can be used to access resources external to the server to perform account authentication, and must set the value in AAuthenticated to indicate that the client has access to the FTP server.

When the account has been authenticated in the event handler, values in the TIdFTPServerThread client connection are updated to indicate the status and password used in the authorization process.

An FTP server implementation must assign a procedure to the event handler to allow responding to the event notification.

Use OnAfterUserLogin to perform server maintenance required after a successful authentication attempt for the client connection.