JHTML List User an J1.6

77 views
Skip to first unread message

Steffen Janke

unread,
Aug 2, 2011, 7:36:50 AM8/2/11
to joomla-de...@googlegroups.com
Hello

I'm just a component of Joomla 1.5 to 1.6/1.7 to switch. Well I have a problem, I call there on the active Joomla User:
$lists['user']            = JHTML::_( 'list.users', 'joomlaid', $darst->joomlaid, true, null, 'name', false );
Now I get all users displayed many times (depending on how many groups in the User)
Is this an Error?
I've patched this file: libraries/joomla/html/list.php (line 189)
from:
. $and
. ' ORDER BY '. $order
;
to
. $and
. ' GROUP BY u.id'
. ' ORDER BY '. $order
;

regards Steffen



Tuan Pham Ngoc

unread,
Aug 2, 2011, 12:52:24 PM8/2/11
to Joomla! General Development
I agree that this is a bug in Joomla 1.6, Joomla 1.7. To fix this, we
can simply use DISTINCT in the sql command :

$query = 'SELECT DISTINCT u.id AS value, u.name AS text'
. ' FROM #__users AS u'
. ' JOIN #__user_usergroup_map AS m ON m.user_id = u.id'
. ' WHERE u.block = 0'
. $and
. ' ORDER BY '. $order
;


Omar Ramos

unread,
Aug 2, 2011, 1:05:37 PM8/2/11
to joomla-de...@googlegroups.com
Has this been posted on JoomlaCode.org as a bug?

If not, please do so and we can make sure to get this corrected in an upcoming release.

-Omar

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.


Steffen Janke

unread,
Aug 2, 2011, 1:24:46 PM8/2/11
to joomla-de...@googlegroups.com
I've tried to create an account there more often, but not received a confirmation email. Therefore, I can report there either.

2011/8/2 Omar Ramos <orw...@gmail.com>

Steffen Janke

unread,
Aug 2, 2011, 1:30:26 PM8/2/11
to joomla-de...@googlegroups.com
Now the account creation has worked, and I reported it.

2011/8/2 Steffen Janke <steffe...@googlemail.com>

Omar Ramos

unread,
Aug 2, 2011, 1:32:25 PM8/2/11
to joomla-de...@googlegroups.com
Awesome, for reference this is the link to the new tracker item Steffen created:

-Omar

elin

unread,
Aug 2, 2011, 7:00:10 PM8/2/11
to joomla-de...@googlegroups.com
Most likely that should be deprecated since it is designed for the <1.5 user table.

If you want a select list of users I would recommend using a user field type in JForm.

Elin
Reply all
Reply to author
Forward
0 new messages