Adding an OnLogin() callback method (as suggested by the previous answer) will only work for the current
user's messages.  If the user is a proxy for some other principal, the user won't see the
principal's new messages.

The suggestion is to instead configure the SDAOperation setting on the SDA service
(HSPortal_SDAService) to send requests to an Ensemble component that triggers the request to
retrieve messages and forwards the message to the existing SDA operation (HSPortal_SDAOperation).

This has a few benefits:
- The account interface doesn't get touched
- The user would get notified of messages from all principals, not just the current user
- The work would occur in the background instead of blocking the login process

To add an OnLogin callback method, you must create a personal community Interface class which extends Acct.Interface.  That class should override the OnLogin method which takes a %ZEN.proxyObject as an argument and returns a %Status.  The %ZEN.proxyObject will have a "Username" property populated.

Once you've compiled your new interface class, you can register it with personal community with:

w ##class(Acct.Config).SetInterfaceClass(<name of class>)

If you want this method to send Ensemble messages, you'll need a custom business service which sends the messages, and you'll have to invoke it with CreateBusinessService/ProcessInput as described here: