Show/Hide Toolbars

Navigation: Advanced topics > Events > Global events

PHPrunner32x32     PHPRunner manual


Event: OnAuditLog

Scroll Prev Next More

 

Description

Function OnAuditLog is executed before a record is added to the log.

Syntax

OnAuditLog($action,$params,$table,$keys,$newvalues,$oldvalues)

Arguments

$action - Action occured.

$params - $params[0]: user IP address, $params[1]: username.

$table - Table being modified.        

$keys - Array of key column values pointing to the current record.

$newvalues - Array of field values being added to the database.    

$oldvalues - Array of previous field values. Applies to the Edit and Delete functions.

Return value

True: to save the action in the log.

False: to not save the action in the log.

Applies to pages

All pages. Insert your code into the Before audit log event.

Example

If you do not want to record actions done by the admin in the audit log, you can use the following code:

Before audit log event

if ($params[1]=="admin")

  return false;

 

return true;