17 require_once SQ_CORE_PACKAGE_PATH.
'/system/triggers/trigger_condition/trigger_condition.inc';
50 public static function evaluate($settings, &$state)
52 return ($GLOBALS[
'SQ_SYSTEM']->userPublic() == $settings[
'is_public_user']);
67 public static function getInterface($settings, $prefix, $write_access=FALSE)
70 $options = Array(0 => translate(
'is_not'), 1 => translate(
'is'));
71 $value = array_get_index($settings,
'is_public_user', 1);
73 combo_box($prefix.
'[is_public_user]', $options, FALSE, $value);
75 echo
'<b>'.$options[$value].
'</b>';
77 $is_public_user_str = ob_get_clean();
79 return translate(
'trigger_asset_public_user', $is_public_user_str);
96 if (empty($request_data)) {
97 return translate(
'trigger_input_data_error');
100 $settings[
'is_public_user'] = $request_data[
'is_public_user'];