Skip to content

Commit

Permalink
Merge branch 'MDL-42226_master' of https://github.com/markn86/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Oct 15, 2013
2 parents 3745472 + 5241526 commit 9bb34fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions badges/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -935,10 +935,11 @@ public function __construct($hash) {
array('hash' => $hash), IGNORE_MISSING);
if ($rec) {
// Get a recipient from database.
$user = $DB->get_record_sql('SELECT u.id, u.lastname, u.firstname,
$namefields = get_all_user_name_fields(true, 'u');
$user = $DB->get_record_sql("SELECT u.id, $namefields,
u.email AS accountemail, b.email AS backpackemail
FROM {user} u LEFT JOIN {badge_backpack} b ON u.id = b.userid
WHERE u.id = :userid', array('userid' => $rec->userid));
WHERE u.id = :userid", array('userid' => $rec->userid));
$this->recipient = $user;
$this->visible = $rec->visible;
$this->badgeid = $rec->badgeid;
Expand Down

0 comments on commit 9bb34fb

Please sign in to comment.