Skip to content

Commit

Permalink
Fixed issue: No owner shown in central participants database if owner…
Browse files Browse the repository at this point in the history
… full name not set
  • Loading branch information
c-schmitz committed Mar 1, 2013
1 parent 43b0c87 commit b7372de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion application/controllers/admin/participantsaction.php
Expand Up @@ -835,9 +835,12 @@ function getParticipants_json($search = null)
// Super admin
$sCanEdit = "true";
}
if (trim($row['ownername'])=='') {
$row['ownername']=$row['username'];
}
$aRowToAdd['cell'] = array($row['participant_id'], $sCanEdit, $row['firstname'], $row['lastname'], $row['email'], $row['blacklisted'], $row['survey'], $row['language'], $row['ownername']);
$aRowToAdd['id'] = $row['participant_id'];
unset($row['participant_id'], $row['firstname'], $row['lastname'], $row['email'], $row['blacklisted'], $row['language'],$row['ownername'],$row['owner_uid'], $row['can_edit'], $row['survey']);
unset($row['participant_id'], $row['firstname'], $row['lastname'], $row['email'], $row['blacklisted'], $row['language'],$row['ownername'],$row['owner_uid'], $row['can_edit'], $row['survey'], $row['username']);
foreach($row as $key=>$attvalue)
{
$aRowToAdd['cell'][] = $attvalue;
Expand Down
2 changes: 2 additions & 0 deletions application/models/Participants.php
Expand Up @@ -266,6 +266,8 @@ private function getParticipantsSelectCommand($count = false, $attid, $search =

$selectValue[] = "p.*";
$selectValue[] = "luser.full_name as ownername";
$selectValue[] = "luser.users_name as username";


// Add survey count subquery
$subQuery = Yii::app()->db->createCommand()
Expand Down

0 comments on commit b7372de

Please sign in to comment.