Fork me on GitHub

Changes for #737

Description changed by barbuslex (2012-09-03 06:46:41)

 1:  1:
 Hi, Hi,
  
-It's nnable to change email address not verified members for an administrator.+It's nnable to change email address for not verified members by an administrator.
  
 Bug discover's in profile.php Bug discover's in profile.php
 // Fetch the user group of the user we are editing // 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()); $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)) if (!$db->num_rows($result))
  message($lang_common['Bad request'], false, '404 Not Found');  message($lang_common['Bad request'], false, '404 Not Found');
  
  
 INNER JOIN is the problem. 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. 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.