User tests: Successful: Unsuccessful:
Pull Request for Issue #39190
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
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
The default action log mail template does not offer the ability to include the ip address
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 query
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
Status | New | ⇒ | Pending |
Category | ⇒ | Administration SQL com_admin Postgresql Installation |
Thanks @richard67
Labels |
Added:
PR-6.0-dev
|
@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
@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 {"tags": "ipaddress"}
instead of appending ipaddress to the tags array
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.
Besides this, you have 2 update SQL script now for postgresql, 6.0.0-2025-03-25.sql
and 6.0.0-2025-08-27.sql
. I guess the former should be reverted.
Anyway, I will try to find time on Friday or weekend to investigate the necessary SQL statement.
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
The only way to have changed it yourself would have been a manual SQL query (hack)
@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
I have successfully tested this and it worked :) I see an IP in my User Action log email! Very cool!
Thanks @brianteeman!
@brianteeman Example how to add a parameter to a column with a JSON value: