//getting additinal information for each identity
foreach ($identities as $key=>$id) {
- $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND `nurl` = '%s'
- AND (`network` = '%s' OR `self` = 1)",
- intval($a->user['uid']),
- dbesc($id['username']),
- dbesc($id['nickname']),
- dbesc(normalise_link($a->get_baseurl() . '/profile/' . $id['nickname'])),
- dbesc(NETWORK_DFRN)
- );
+ $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = '%s' AND `self` = 1",
+ dbesc($id['uid'])
+ );
+
$identities[$key][thumb] = $thumb[0][thumb];
$identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? true : false);