/** * Class constructor */ private function __construct() { $this->conversationDao = MAILBOX_BOL_ConversationDao::getInstance(); $this->lastMessageDao = MAILBOX_BOL_LastMessageDao::getInstance(); $this->messageDao = MAILBOX_BOL_MessageDao::getInstance(); $this->attachmentDao = MAILBOX_BOL_AttachmentDao::getInstance(); $this->userLastDataDao = MAILBOX_BOL_UserLastDataDao::getInstance(); }
public function resetAllUsersLastData() { $sql = "SELECT COUNT(*) FROM `" . MAILBOX_BOL_UserLastDataDao::getInstance()->getTableName() . "` AS `uld`\nLEFT JOIN `" . BOL_UserOnlineDao::getInstance()->getTableName() . "` AS uo ON uo.userId = uld.userId\nWHERE uo.id IS NULL"; $usersOfflineButOnline = OW::getDbo()->queryForColumn($sql); if ($usersOfflineButOnline > 0) { MAILBOX_BOL_ConversationService::getInstance()->resetAllUsersLastData(); } }