PHP код:
// No SYS code must exist in this method
// If you need the startup command, look in the class SysStartupCmd
void startupPost()
{
xSession session;
int counter;
str warning;
//--- CRM start
if (!appl.isConfigMode())
{
//--- Prevent call to smmInit during installation of Axapta
//--- If not, code in the method below is run that uses a table that has not yet been created
for (counter = 1; counter <= xSession::maxSessionId(); counter++)
{
session = new xSession(counter, true);
if (session)
{
if (session.sessionId() != sessionid())
{
if (curuserid() == session.userId())
{
warning = strfmt("User %1 is already logged in!", session.userId());
Box::warning(warning, "Login problem!");
InfoLog.shutDown(true);
}
}
}
}
SmmInit::construct();
}
//--- CRM end
}