- Code: Select all
foreach (array_keys($record->_table->fields()) as $fieldname){
$key = $fieldname;
$value = $record->display($key);
$content .= "$key: $value\n";
}
That part works well and is helpful to see when someone is updating the record, but it is not usually obvious what was changed. Is it possible to use the getDiffs function in HistoryTool.php for this, or is there another function to indicate what has changed?
Also, there a method to send out e-mail notification or write to a log file, etc. when a user logs in, changes their password, etc.? I suppose I could add some mail statements to the authenticate function in AuthenticationTool.php for successful and/or failed logins, as well as the change_password.php action. Is this the best way to do it?
Thanks,
Alan