1
succhi
Bug in profile/admin/user
  • 2005/8/28 14:41

  • succhi

  • Just popping in

  • Posts: 20

  • Since: 2004/3/20


I was trying to work out why I could not modify the settings for a user's groups or even my own. I found the following two lines and the one I needed to 'comment out'/remove in /modules/profile/admin/user.php.

149: $new_groups = isset($_POST['groups']) ? $_POST['groups'] : array();
150: //$user->setGroups($new_groups);

The reason it needs commenting out is because below that is a section that checks the difference between the current array of groups and the new set

156: $cur_groups = $user->getGroups();

158: $added_groups = array_diff($new_groups, $cur_groups);
159: $removed_groups = array_diff($cur_groups, $new_groups);

So if line 150 has set the groups already when we call $user->getGroups(); on line 156 $cur_groups will already be the same as $new_groups and because there is now no difference the groups will not be inserted/removed

I am too buggered finding that to track down the sql issue found when triggering a save op in the same page (saving settings for instance) The error is as follows

SELECT COUNT(*) FROM fcn_group_permission WHERE (gperm_modid = '1' AND gperm_name = 'module_admin' AND gperm_groupid IN () AND gperm_itemid = '2')
Error number: 1064
Error message: 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 ') AND gperm_itemid = '2')' at line 1
( 0.000362)

Stuart.

2
Mithrandir
Re: Bug in profile/admin/user

Thanks. Could I get you to submit it to the SF.net patches tracker? Then we won't forget about it and not forget about crediting you, either.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

Login

Who's Online

239 user(s) are online (178 user(s) are browsing Support Forums)


Members: 0


Guests: 239


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits