Improves education edition display.
[platal.git] / include / vcard.inc.php
index d16dae6..b62d09f 100644 (file)
@@ -83,6 +83,7 @@ class VCard extends PlVCard
         }
 
         // Emails
+        // TODO: this logic is not hruid-compatible; replace it.
         $entry->addMail(null, $user['bestalias'] . '@' . $globals->mail->domain, true);
         $entry->addMail(null, $user['bestalias'] . '@' . $globals->mail->domain2);
         if ($user['bestalias'] != $user['forlife']) {
@@ -162,7 +163,7 @@ class VCard extends PlVCard
             $res = XDB::query(
                     "SELECT  attach, attachmime
                        FROM  photo AS p
-                      WHERE  u.user_id = {?}", $login->id());
+                      WHERE  p.uid = {?}", $login->id());
             if ($res->numRows()) {
                 list($data, $type) = $res->fetchOneRow();
                 $entry->setPhoto($data, strtoupper($type));