function password_policy_password_change_settings in Password Policy 7
Same name and namespace in other branches
- 6 password_policy.admin.inc \password_policy_password_change_settings()
Forced password change form.
1 string reference to 'password_policy_password_change_settings'
- password_policy_menu in ./
password_policy.module - Implements hook_menu().
File
- ./
password_policy.admin.inc, line 647 - Admin page callback file for the Password Policy module.
Code
function password_policy_password_change_settings() {
$form = array();
$form['password_policy_new_login_change'] = array(
'#type' => 'checkbox',
'#title' => t('Force password change on first-time login'),
'#default_value' => variable_get('password_policy_new_login_change', 0),
);
$roles = user_roles(TRUE);
$form['password_policy_force_change_roles'] = array(
'#type' => 'checkboxes',
'#options' => $roles,
'#title' => t('Force users in the following roles to change their password'),
'#description' => t('Users who are not logged in will be required to change their password immediately upon login. Users who are currently logged in will be required to change their password upon their next page request, but after changing their password will be redirected back to the page they were attempting to access.'),
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save changes'),
);
return $form;
}