-if (store->WriteUserDisconnect(login, up, down, sessionUpload, sessionDownload,
- cash, freeMb, reasonMessage))
+if (!settings->GetDisableSessionLog() && store->WriteUserDisconnect(login, up, down, sessionUpload, sessionDownload,
+ cash, freeMb, reasonMessage))