* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-require_once('xorg.misc.inc.php');
require_once('user.func.inc.php');
class VCardIterator implements PlIterator
public function add_user($user)
{
- $this->user_list[] = get_user_forlife($user);
- $this->count++;
+ $user = User::getSilent($user);
+ if ($user) {
+ $this->user_list[] = $user;
+ $this->count++;
+ }
}
public function first()
}
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']);
$user['forlife'].'@'.$globals->mail->domain2);
$user['virtualalias'] = $res->fetchOneCell();
- $user['gpxs_vcardjoin'] = join(',', array_map(array('VCard', 'text_encode'), $user['gpxs_name']));
- $user['binets_vcardjoin'] = join(',', array_map(array('VCard', 'text_encode'), $user['binets']));
+ $user['gpxs_vcardjoin'] = join(', ', array_map(array('VCard', 'text_encode'), $user['gpxs_name']));
+ $user['binets_vcardjoin'] = join(', ', array_map(array('VCard', 'text_encode'), $user['binets']));
// 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();
}
header("Pragma: ");
header("Cache-Control: ");
header("Content-type: text/x-vcard; charset=UTF-8");
- header("Content-Transfer-Encoding: 8bit");
}
}