Skip to content

Commit

Permalink
Fixed issue #8355: Error (CDbException) when adding a user group to a…
Browse files Browse the repository at this point in the history
… survey

Dev: table structure was changed in a previous commit
  • Loading branch information
mfaber committed Nov 15, 2013
1 parent e044f5e commit 7f83cb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public function insertRecords($data)
*/
public function getCommonUID($surveyid, $postusergroupid)
{
$query2 = "SELECT b.uid FROM (SELECT uid FROM {{permissions}} WHERE sid = :surveyid) AS c RIGHT JOIN {{user_in_groups}} AS b ON b.uid = c.uid WHERE c.uid IS NULL AND b.ugid = :postugid";
$query2 = "SELECT b.uid FROM (SELECT uid FROM {{permissions}} WHERE entity_id = :surveyid AND entity = 'survey') AS c RIGHT JOIN {{user_in_groups}} AS b ON b.uid = c.uid WHERE c.uid IS NULL AND b.ugid = :postugid";
return Yii::app()->db->createCommand($query2)->bindParam(":surveyid", $surveyid, PDO::PARAM_INT)->bindParam(":postugid", $postusergroupid, PDO::PARAM_INT)->query(); //Checked
}

Expand Down

0 comments on commit 7f83cb4

Please sign in to comment.