diff --git a/user_reference/user_reference.module b/user_reference/user_reference.module index ca2bbfe..34d0760 100644 --- a/user_reference/user_reference.module +++ b/user_reference/user_reference.module @@ -61,13 +61,14 @@ : array(), '#options' => user_roles(TRUE), ); + $form['referenceable_status'] = array( '#type' => 'checkboxes', '#title' => t('User status that can be referenced'), '#default_value' => is_array($settings['referenceable_status']) ? array_filter($settings['referenceable_status']) : array(1), - '#options' => array(1 => t('Active'), 0 => t('Blocked')), + '#options' => array(1 => t('Active'), 2 => t('Blocked')), ); if (module_exists('views')) { @@ -859,6 +860,10 @@ // Enable this filter only if any statuses checked (and not both). if (count($filter_status) == 1) { + //blocked user is saved as 2,it has to be reverted back to 0 + if (isset($filter_status[2])) { + $filter_status = array(0 => 0); + } $query->condition('u.status', array_keys($filter_status), 'IN'); }