function ctools_compare_users_settings
Settings form for the 'by perm' access plugin.
1 string reference to 'ctools_compare_users_settings'
- compare_users.inc in plugins/
access/ compare_users.inc - CTools access plugin to provide access/visiblity if two user contexts are equal.
File
-
plugins/
access/ compare_users.inc, line 30
Code
function ctools_compare_users_settings($form, &$form_state, $conf) {
$form['settings']['helptext'] = array(
'#type' => 'markup',
'#value' => '<div>' . t('Grant access based on comparison of the two user contexts. For example, to grant access to a user to view their own profile, choose "logged in user" and "user being viewed" and say "grant access if equal". When they\'re the same, access will be granted.') . '</div>',
);
$form['settings']['equality'] = array(
'#type' => 'radios',
'#title' => t('Grant access if user contexts are'),
'#options' => array(
1 => t('Equal'),
0 => t('Not equal'),
),
'#default_value' => $conf['equality'],
);
return $form;
}