- if(remote_user() && count($_SESSION['remote'])) {
- foreach($_SESSION['remote'] as $visitor) {
- if($visitor['uid'] == $uid) {
- $r = q("SELECT `profile-id` FROM `contact` WHERE `id` = %d LIMIT 1",
- intval($visitor['cid'])
- );
- if (dbm::is_result($r))
- $profile = $r[0]['profile-id'];
- break;
+ if (remote_user() && count($_SESSION['remote'])) {
+ foreach ($_SESSION['remote'] as $visitor) {
+ if ($visitor['uid'] == $uid) {
+ $r = dba::select('contact', array('profile-id'), array('id' => $visitor['cid']), array('limit' => 1));
+ if (dbm::is_result($r)) {
+ $profile = $r['profile-id'];