Support

  1. scharfe
  2. Support
  3. Friday, August 07 2015, 11:50 AM
Hello,
I use Joomla! 3.4.3 and Easy Profiles Basic on http://www.bs-korbach.de.
When I'm logged in as a user and edit my profile (index.php?option=com_users&view=profile&layout=edit) and save this error message appears to me:

Error: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3 SQL=SELECT title FROM jom_usergroups WHERE id IN ()


The data will be stored correctly in the database.
Can you give me a hint where I can look for the error.

Thanks
Volker
scharfe Accepted Answer
Basic
Content Protected
  1. more than a month ago
  2. Support
  3. # 1
admin Accepted Answer
Admin
Hi,
try to use
JFactory::getUser($id)->getAuthorisedGroups()
instead
JFactory::getUser($id)->groups


When user update profile the session is reset and some temp var is lost.
  1. more than a month ago
  2. Support
  3. # 2
scharfe Accepted Answer
Basic
That's right - otherwise the code would also work
  1. more than a month ago
  2. Support
  3. # 3
admin Accepted Answer
Admin
Hi,
this is not our code.
  1. more than a month ago
  2. Support
  3. # 4
scharfe Accepted Answer
Basic
The error was due to a separate query to display the assignment of the user group in the profile. I have no idea why the query had worked prior I changed the "view levels" !?

$user = JFactory::getUser();
function getGroupTitles($id)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query
->select('title')->from('#__usergroups')
->where('id IN (' . implode(',', array_values(JFactory::getUser($id)->groups)) . ')');
$db->setQuery($query);
return $db->loadColumn();
}
foreach(getGroupTitles($user->id) as $group) {
echo '<dt class="Label">user rights</dt><dd class="Value">' . $group . '</dd>';
}
  1. more than a month ago
  2. Support
  3. # 5
admin Accepted Answer
Admin
after better control, this query is strange and should not come directly from our system. It would be useful to be able to access your site to check.

We use a similar query to add user to some usergroup
SELECT title FROM xxx_usergroups WHERE id = someID
not
SELECT title FROM xxx_usergroups WHERE id IN ( someID )
  1. more than a month ago
  2. Support
  3. # 6
admin Accepted Answer
Admin
Hi,

if you have some field with condition to add/remove from usergroups, try to:
- go on Components->Easy Profile
- Choose this field and open it to edit
- Save field
  1. more than a month ago
  2. Support
  3. # 7
scharfe Accepted Answer
Basic
Content Protected
  1. more than a month ago
  2. Support
  3. # 8
scharfe Accepted Answer
Basic
Content Protected
  1. more than a month ago
  2. Support
  3. # 9
admin Accepted Answer
Admin
Hi,
I thinks you have some field condition to add/remove user from usergroup that not exists anymore.

try to open and save your field that contain this condition, otherwise post me your site details*, we will do it for you ;)

* you can use the form below the reply in "Site Details" tab
  1. more than a month ago
  2. Support
  3. # 10
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.