From a104d709cf3ee9764a41c5d3b767a8cdab20f4e2 Mon Sep 17 00:00:00 2001 From: Vincent Zanotti Date: Mon, 16 Jun 2008 03:12:12 +0200 Subject: [PATCH] Removes get_user_forlife calls in VCards. Signed-off-by: Vincent Zanotti --- include/vcard.inc.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/vcard.inc.php b/include/vcard.inc.php index a4366fc..52d6cb3 100644 --- a/include/vcard.inc.php +++ b/include/vcard.inc.php @@ -37,7 +37,7 @@ class VCardIterator implements PlIterator public function add_user($user) { - $this->user_list[] = get_user_forlife($user); + $this->user_list[] = User::get($user); $this->count++; } @@ -63,7 +63,7 @@ class VCardIterator implements PlIterator } global $globals; $login = array_shift($this->user_list); - $user = get_user_details($login); + $user = get_user_details($login->login()); if (strlen(trim($user['freetext']))) { $user['freetext'] = pl_entity_decode($user['freetext']); @@ -94,10 +94,9 @@ class VCardIterator implements PlIterator // get photo if ($this->photos) { $res = XDB::query( - "SELECT attach, attachmime - FROM photo AS p - INNER JOIN aliases AS a ON (a.id = p.uid AND a.type = 'a_vie') - WHERE a.alias = {?}", $login); + "SELECT attach, attachmime + FROM photo AS p + WHERE u.user_id = {?}", $login->id()); if ($res->numRows()) { $user['photo'] = $res->fetchOneAssoc(); } -- 2.1.4