function _user_readonly_get in User Read-Only 5
Same name and namespace in other branches
- 6 user_readonly.module \_user_readonly_get()
- 7 user_readonly.module \_user_readonly_get()
Gets the default restrictions set by user_readonly_admin_settings() and if none are set, sets up some empty array elements.
Return value
array
2 calls to _user_readonly_get()
- user_readonly_admin_settings in ./
user_readonly.module - Configuration form for setting default restrictions.
- user_readonly_form_alter in ./
user_readonly.module - Prevent the user from attempting to edit the field, thus preventing confusion. insert a hidden field w/ the appropriate value, since disabled fields do not get posted.
File
- ./
user_readonly.module, line 15 - This module provides restrictions on user account/profile fields.
Code
function _user_readonly_get() {
$a = variable_get('user_readonly', '');
if (empty($a)) {
$a = array(
0 => array(
'mode' => 'deny',
'roles' => array(),
'action' => 'disable',
),
);
}
return $a;
}