Skip to content

Commit

Permalink
Fixed issue #6928: Error when attempting to access 'Participant Panel…
Browse files Browse the repository at this point in the history
…' as a restricted user and using MSSQL
  • Loading branch information
c-schmitz committed Nov 25, 2012
1 parent 1778740 commit 7061c4a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions application/models/Participants.php
Expand Up @@ -171,9 +171,10 @@ function getParticipantsOwner($userid)
->select('{{participants}}.*,{{participant_shares}}.can_edit')
->from('{{participants}}')
->leftJoin('{{participant_shares}}', ' {{participants}}.participant_id={{participant_shares}}.participant_id')
->where('owner_uid = :userid OR share_uid = :userid')
->where('owner_uid = :userid1 OR share_uid = :userid2')
->group('{{participants}}.participant_id')
->bindParam(":userid", $userid, PDO::PARAM_INT)
->bindParam(":userid1", $userid, PDO::PARAM_INT)
->bindParam(":userid2", $userid, PDO::PARAM_INT)
->queryAll();
}

Expand All @@ -184,8 +185,9 @@ function getParticipantsOwnerCount($userid)
->select('{{participants}}.*,{{participant_shares}}.can_edit')
->from('{{participants}}')
->leftJoin('{{participant_shares}}', '{{participants}}.participant_id={{participant_shares}}.participant_id')
->where('owner_uid = :userid OR share_uid = :userid')
->bindParam(":userid", $userid, PDO::PARAM_INT)
->where('owner_uid = :userid1 OR share_uid = :userid2')
->bindParam(":userid1", $userid, PDO::PARAM_INT)
->bindParam(":userid2", $userid, PDO::PARAM_INT)
->queryAll());
}

Expand Down

0 comments on commit 7061c4a

Please sign in to comment.