function userprotect_form_display_protections in User protect 6
Same name and namespace in other branches
- 7 userprotect.module \userprotect_form_display_protections()
Conditionally displays a user message on edit forms listing current protections.
Parameters
$account The user account object.:
$protected An array of protections the current user is receiving.:
1 call to userprotect_form_display_protections()
- userprotect_form_alter in ./
userprotect.module - Alters forms for user protection.
File
- ./
userprotect.module, line 993
Code
function userprotect_form_display_protections($account, $protected) {
// If we're initially displaying an edit form, throw a message if
// there are any protected fields, so the editor has a clue.
if (!empty($protected) && !$_POST) {
drupal_set_message(userprotect_display_protections($account, $protected));
}
}