/** * @param waContact $user * @return string */ public static function getAccessDisableMsg($user) { $access_disable = ''; if ($user['is_user'] == '-1') { $log_model = new waLogModel(); $log_item = $log_model->select('*')->where("subject_contact_id = i:id AND action = 'access_disable'", array('id' => $user['id']))->order('datetime DESC')->limit(1)->fetch(); if ($log_item) { $contact = new waContact($log_item['contact_id']); $name = htmlspecialchars(waContactNameField::formatName($contact)); $access_disable = _w("Access disabled by") . " <a href='#/contact/{$log_item['contact_id']}/'>{$name}</a>, " . wa_date("humandatetime", $log_item['datetime']); } } return $access_disable; }