?
avatar ggppdk
ggppdk
9 Jun 2018

Steps to reproduce the issue

Every time that you call: $session = JFactory::getSession()->getData();

  • you get 2 duplicate queries to DB tables: __users , __usergroups

just enable debug plugin and look at the duplicate queries to DB tables: __users , __usergroups

Expected result

No duplicate queries when calling:
JSession::getData()

Actual result

Duplicate queries because current user is loaded again ...

JSessiongetData uses clone() to return $this->data, thus you get

JSession::getData()
clone($this->data)
unserialize(...)
JUser::__wakeup()
...
JTable::load(...) // So currrent user is loaded again

System information (as much as possible)

J3.8.8

Additional comments

Related PR was #20697 , but probably was wrong way to fix this

@mbabker , i closed the other PR as it was probably wrong way to address this, and instead i have opened this issue

avatar ggppdk ggppdk - open - 9 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jun 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Jun 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 9 Jun 2018
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 9 Jun 2018
Category com_users SQL
avatar ggppdk ggppdk - change - 9 Jun 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-06-09 08:24:30
Closed_By ggppdk
avatar ggppdk ggppdk - close - 9 Jun 2018

Add a Comment

Login with GitHub to post a comment