function protected_node_action_remove_passwords in Protected Node 7
Same name and namespace in other branches
- 6 protected_node.settings.inc \protected_node_action_remove_passwords()
- 1.0.x protected_node.settings.inc \protected_node_action_remove_passwords()
Remove all the passwords.
This function sets all the password to the empty string which has the effect of resetting the password to use the global password on all nodes.
1 string reference to 'protected_node_action_remove_passwords'
- protected_node_admin_settings in ./
protected_node.settings.inc - Define the settings form.
File
- ./
protected_node.settings.inc, line 873 - Configuration file for the protected_node module.
Code
function protected_node_action_remove_passwords($form, &$form_state) {
db_update('protected_nodes')
->fields(array(
'protected_node_passwd' => '',
))
->condition('protected_node_passwd', '', '<>')
->execute();
}