- $r = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
- intval($_SESSION['visitor_id'])
- );
- if (DBA::is_result($r)) {
- self::getApp()->contact = $r[0];
+ $contact = DBA::selectFirst('contact', [], ['id' => $_SESSION['visitor_id']]);
+ if (DBA::isResult($contact)) {
+ self::getApp()->contact = $contact;