You are here

function uc_order_condition_user_login_form in Ubercart 6.2

See also

uc_order_condition_user_login()

File

uc_order/uc_order.ca.inc, line 1019
This file contains the Conditional Actions hooks and functions necessary to make the order related entity, conditions, events, and actions work.

Code

function uc_order_condition_user_login_form($form_state, $settings = array()) {
  $form['operator'] = array(
    '#type' => 'radios',
    '#title' => t('Operator'),
    '#options' => array(
      'less' => t('User last logged in before the specified date.'),
      'less_equal' => t('User last logged in on, or before the specified date.'),
      'equal' => t('User last logged in on the specified date.'),
      'not_equal' => t('User did not log in last on the specified date.'),
      'greater_equal' => t('User last logged in on or after the specified date.'),
      'greater' => t('User last logged after the specified date.'),
    ),
    '#default_value' => isset($settings['operator']) ? $settings['operator'] : 'equal',
  );
  $form['login'] = array(
    '#type' => 'date',
    '#title' => t('User last login date'),
    '#default_value' => isset($settings['created']) ? $settings['created'] : '',
  );
  return $form;
}