Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
mysql -u openaudit -popenauditpassword -e "DELETE FROM openaudit.oa_user_org; INSERT INTO openaudit.oa_user_org (id, user_id, org_id, access_level, permissions) SELECT NULL, id, 0, 10, '' FROM openaudit.oa_user;"

 

 

Delete Devices not Seen for 30 Days

Modify the file open-audit/code_igniter/application/models/m_system.php and change line 1027 to the below. There is a missing right round bracket after DATE(last_seen.

Code Block
        $sql = "DELETE FROM system WHERE DATE(last_seen) < DATE_SUB(curdate(), INTERVAL " . intval($days) . " day)";