Fork me on GitHub
Subscribe 3

Ticket #737 (fixed bug)

Unable to change profile info of unverified users

  • Created: 2012-09-03 06:39:46
  • Reported by: barbuslex
  • Assigned to: quy
  • Milestone: 1.5.1
  • Component: code
  • Priority: normal

Hi,

It's unable to change email address for not verified members by an administrator.

Bug discover's in profile.php
// Fetch the user group of the user we are editing
$result = $db->query('SELECT u.username, u.group_id, g.g_moderator FROM '.$db->prefix.'users AS u INNER JOIN '.$db->prefix.'groups AS g ON (g.g_id=u.group_id) WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
if (!$db->num_rows($result))
    message($lang_common['Bad request'], false, '404 Not Found');


INNER JOIN is the problem.
In fact, the system searches in the database member with the group # 0 and # 0 no group exists in database then an error is triggered and can not change the email address.

History

barbuslex 2012-09-03 06:42:27

For solve temporary the bug i change INNER JOIN by LEFT JOIN but i think that isn't a good solution...

barbuslex 2012-09-03 06:46:41

  • Description changed. (Diff)
  • Summary changed from Unable to change email address not verified members to Unable to change email address for not verified members.

barbuslex 2012-09-03 07:38:01

  • Description changed. (Diff)

Franz 2012-09-03 10:56:05

  • Component set to code.
  • Milestone set to 1.5.1.
  • Priority changed from high to normal.

quy 2012-09-25 03:03:37

Commit 8778373 to fluxbb master

#737: Fixed updating profile info of unverified users

quy 2012-09-25 03:06:25

  • Owner set to quy.
  • Status changed from open to fixed.
  • Summary changed from Unable to change email address for not verified members to Unable to change profile info of unverified users.

Franz 2012-09-25 09:17:12

Hmm, I wonder why that should be possible at all!?

After all, the user is unverified, which means he hasn't yet confirmed his email address...

quy 2012-09-25 14:57:14

Maybe the user wants to be verified under a different email address or the email address was entered incorrectly.

barbuslex 2012-09-26 09:08:51

Yes I had a request from a user in which he asked me to change his email address because it has been hack.
This is how I found the bug.