Created
November 18, 2013 13:15
-
-
Save steven2358/7527534 to your computer and use it in GitHub Desktop.
Drupal 6 module to hide language options on the user edit page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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