? Pending

User tests: Successful: Unsuccessful:

avatar tecpromotion
tecpromotion
23 May 2019

Summary of Changes

In the User Actions Log extension, the user is always used in the output. The exception is the log entries related to the cache. Here, the user name is always used instead of the user.

With the change now value username is used instead of value name.

Testing Instructions

Create a new user with
name = Super User
and
username = test

Expected result

User test deleted cache group all

Actual result

User Super User deleted cache group all

Documentation Changes Required

--

avatar tecpromotion tecpromotion - open - 23 May 2019
avatar tecpromotion tecpromotion - change - 23 May 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 May 2019
Category Front End Plugins
avatar brianteeman
brianteeman - comment - 23 May 2019

Also see #24862

avatar tecpromotion tecpromotion - change - 24 May 2019
Labels Added: ?
avatar degobbis degobbis - test_item - 22 Jun 2019 - Tested successfully
avatar degobbis
degobbis - comment - 22 Jun 2019

I have tested this item successfully on c3f1500

thx


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24992.

avatar alikon alikon - test_item - 22 Jun 2019 - Tested successfully
avatar alikon
alikon - comment - 22 Jun 2019

I have tested this item successfully on c3f1500


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24992.

avatar zero-24 zero-24 - change - 22 Jun 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-06-22 06:59:40
Closed_By zero-24
avatar zero-24 zero-24 - close - 22 Jun 2019
avatar zero-24 zero-24 - merge - 22 Jun 2019
avatar zero-24
zero-24 - comment - 22 Jun 2019

Merging thanks.

avatar infograf768
infograf768 - comment - 22 Jun 2019

The filter by user is still using name and not username
This PR implies changes to the logcreator field.

Without a modification here I get
Screen Shot 2019-06-22 at 09 16 48

Issue solved if modifying the query to use username and not name

// Construct the query
			$query = $db->getQuery(true)
				->select($db->quoteName('u.id', 'value'))
				->select($db->quoteName('u.username', 'text'))
				->from($db->quoteName('#__users', 'u'))
				->join('INNER', $db->quoteName('#__action_logs', 'c') . ' ON ' . $db->quoteName('c.user_id') . ' = ' . $db->quoteName('u.id'))
				->group($db->quoteName('u.id'))
				->group($db->quoteName('u.username'))
				->order($db->quoteName('u.username'));
avatar zero-24
zero-24 - comment - 22 Jun 2019

@infograf768 can you send the required changes as PR?

avatar infograf768
infograf768 - comment - 22 Jun 2019

TBH, I am not sure about the whole thing
Yes, what is logged should be consistent BUT imho it should be the name and not the username displayed in the logs.
The reason is that the username is also the Login Name and this could be a security breach.
What do you think?

avatar infograf768
infograf768 - comment - 22 Jun 2019

This means that we have to do the reverse of that PR, i.e. use ->name everywhere and keep the filter as is.

avatar degobbis
degobbis - comment - 22 Jun 2019

I do not see a security breach here. If you can see the action logs, then you can also access the users component and see the usernames. The improvement is that the username is unique and therefore faster to allocate.

avatar infograf768
infograf768 - comment - 22 Jun 2019

You are right that the name is not unique indeed (which is weird btw...).

Note: it is always the Name which is displayed in the Managers and Created by field (and its modal), which imho demonstrates that we should make the Name unique too...

avatar degobbis
degobbis - comment - 22 Jun 2019

I don't think the name should be unique.
For a clear identification we already have 2 values, username and e-mail address. That's enough, or not?

But if it causes such far-reaching changes, is it perhaps sufficient to write the username in parentheses after the names in the output?
What do you all mean?

avatar infograf768
infograf768 - comment - 22 Jun 2019

Please test
#25291

Going further would need more important changes and should imho be reserved to J4.

avatar infograf768
infograf768 - comment - 22 Jun 2019

BTW, why keep using ->name in onUserAfterRemind($user)
It is not consistent imho.

avatar HLeithner
HLeithner - comment - 22 Jun 2019

username is unique, the name isn't. so imo it's better to use username

avatar brianteeman
brianteeman - comment - 22 Jun 2019

we must not make "name" unique. That would be terribly restrictive. Even with my almost unique family name there are two "brian teeman"

avatar HLeithner
HLeithner - comment - 22 Jun 2019

thats the reason that we stay with username instead using name.

avatar infograf768
infograf768 - comment - 23 Jun 2019

Understood that. Tks.

Add a Comment

Login with GitHub to post a comment