Skip to content

Commit

Permalink
Fixed issue #7062: Duplicate user groups in drop-down menu in user gr…
Browse files Browse the repository at this point in the history
…oups section
  • Loading branch information
c-schmitz committed Dec 11, 2012
1 parent a7696d9 commit 4e0fe71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/helpers/common_helper.php
Expand Up @@ -5875,7 +5875,7 @@ function getUserGroupList($ugid=NULL,$outputformat='optionlist')
{
$clang = Yii::app()->lang;
//$squery = "SELECT ugid, name FROM ".db_table_name('user_groups') ." WHERE owner_id = {Yii::app()->session['loginID']} ORDER BY name";
$sQuery = "SELECT a.ugid, a.name, a.owner_id, b.uid FROM {{user_groups}} AS a LEFT JOIN {{user_in_groups}} AS b ON a.ugid = b.ugid WHERE 1=1 ";
$sQuery = "SELECT distinct a.ugid, a.name, a.owner_id FROM {{user_groups}} AS a LEFT JOIN {{user_in_groups}} AS b ON a.ugid = b.ugid WHERE 1=1 ";
if (!hasGlobalPermission('USER_RIGHT_SUPERADMIN'))
{
$sQuery .="AND uid = ".Yii::app()->session['loginID'];
Expand Down

0 comments on commit 4e0fe71

Please sign in to comment.