-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[6.0] User Action Log Emails IP Address #45991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.0-dev
Are you sure you want to change the base?
Conversation
@brianteeman Example how to add a parameter to a column with a JSON value: |
Thanks @richard67 |
@richard67 I've updated the queries - its a bit different to your example as here we are just are adding a value to the params not a full column etc . It works but not sure its correct. Not tested the postgres version - thats a chatgpt conversion. Appreciate your expert guidance. Maybe it doesnt even need the json stuff in this situation |
@brianteeman The examples which I have linked do exactly that, add one new value to the existing params which already might have other values. Check e.g. the documentation of JSON_SET for MySQL. What you are doing now is unnecessarily complicated. The examples which I have linked are complete, it just needs to replace table names and value names. |
ok - i will try again. my first attempt failed miserably |
sorry i give up - all i can succeed as doing is to replace the content of the params field with |
I will not be able to help before Friday. |
@brianteeman Hmm, I see, the thing is indeed a bit different than my example. But I think there must be an easier way to add an element to an array in a json. |
I'm actually wondering if it can't just be a simple query that replaces the entire column value with the new column values. The only way to have changed it yourself would have been a manual SQL query (hack) so it should be safe |
@brianteeman If that is the case, then that would be safe. |
Thanks @richard67 I have marked this PR as ready for review now |
I have tested this item ✅ successfully on 3af041b Thanks @brianteeman! This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45991. |
Pull Request for Issue #39190
Summary of Changes
The User Action Logs has an option to log the ip address. It is disabled by default.
When the logging of IP addresses is enabled it is shown in the User Action Logs component but there is no option available to include the ip address in any action log emails.
This PR adds the option to include the ip address in those emails. It does not include the ip address unless both
Testing Instructions
Apply the sql updates
In the User Action Logs options enable the logging of email addresses
Make sure you have a user setup who will receive action log emails
Open the action log mail template and with this PR there is a new tag available (ip address) that you can include in the emails.
Include the tag and check the received email
Actual result BEFORE applying this Pull Request
The default action log mail template does not offer the ability to include the ip address
Expected result AFTER applying this Pull Request
The default action log mail template still does not send the ip address but you now have the capability to include the ipaddress
@richard67 could you help me with the sql update please. The one currently in this PR is just a placeholder for a real queryLink to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed