You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.
The request is to add an audit trial to p4a applications. To log which user has changed which data and when. I suggest the save this information in a table like this
CREATE TABLE IF NOT EXISTS log_data ( table_name varchar(200) NOT NULL, row_id int(11) NOT NULL, field_name varchar(200) DEFAULT NULL, log_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, user_id int(11) NOT NULL, old_value text, new_value text NOT NULL
)
This way the changes of each record can be shown on the masks. Displaying this information based on the standard SQL logging would take much more time I guess.
Would be nice if this could be a feature linked to p4a.
It looks to me that this can be done by adding this code at /p4a/objects/data_sources/db_source.php at function saveRow
This implies that after the login the session var must be set. So each app using it must have the code line
$_SESSION['log_user'] = $username;
after the successful login.
The text was updated successfully, but these errors were encountered:
The request is to add an audit trial to p4a applications. To log which user has changed which data and when. I suggest the save this information in a table like this
CREATE TABLE IF NOT EXISTS
log_data
(table_name
varchar(200) NOT NULL,row_id
int(11) NOT NULL,field_name
varchar(200) DEFAULT NULL,log_time
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,user_id
int(11) NOT NULL,old_value
text,new_value
text NOT NULL)
This way the changes of each record can be shown on the masks. Displaying this information based on the standard SQL logging would take much more time I guess.
Would be nice if this could be a feature linked to p4a.
It looks to me that this can be done by adding this code at /p4a/objects/data_sources/db_source.php at function saveRow
and at "deleteRow" add
This implies that after the login the session var must be set. So each app using it must have the code line
$_SESSION['log_user'] = $username;
after the successful login.
The text was updated successfully, but these errors were encountered: