Skip to content

Instantly share code, notes, and snippets.

@steven2358
Created November 18, 2013 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steven2358/7527534 to your computer and use it in GitHub Desktop.
Save steven2358/7527534 to your computer and use it in GitHub Desktop.
Drupal 6 module to hide language options on the user edit page
name = Hide language Options
description = "Hide the language options on the user edit page."
dependencies[] = locale
package = User interface
version = "6.x-1.0"
core = "6.x"
project = "hide_language_options"
<?php
function hide_language_options_form_alter(&$form, $form_state, $form_id) {
// hide personal contact form settings for non-admin users
if ($form_id == 'user_profile_form' && !user_access('administer users')) {
unset($form['locale']);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment