function simplesamlphp_auth_install in simpleSAMLphp Authentication 7.3
Same name and namespace in other branches
- 8.3 simplesamlphp_auth.install \simplesamlphp_auth_install()
- 6.3 simplesamlphp_auth.install \simplesamlphp_auth_install()
- 6.2 simplesamlphp_auth.install \simplesamlphp_auth_install()
- 7 simplesamlphp_auth.install \simplesamlphp_auth_install()
- 7.2 simplesamlphp_auth.install \simplesamlphp_auth_install()
Implements hook_install().
File
- ./
simplesamlphp_auth.install, line 11 - The install file for the simplesamlphp_auth module.
Code
function simplesamlphp_auth_install() {
user_role_revoke_permissions(DRUPAL_AUTHENTICATED_RID, array(
'change own password',
));
// Disable the open registration to the site and store the original setting.
$original = variable_get('user_register', 1);
variable_set('user_register', 0);
variable_set('simplesamlphp_auth_user_register_original', $original);
// Inform the user about disabling the open registration.
drupal_set_message(t('The SimpleSAMLphp Authentication module disabled the user registration. You can manually enable it again in the <a href="@user_settings_url">Account settings</a>.', array(
'@user_settings_url' => url('admin/config/people/accounts'),
)), 'warning');
}