Public

User Account / Preferences

global $user;
// changement de langue ?
if (isset($_POST["language"]) and ($_POST["language"] != "")){
//Update user lang
$lang = $_POST["language"];
$userid = $user->uid;
$sql = "UPDATE users SET language = '$lang' WHERE uid = $userid";
db_query($sql);
sess_regenerate();
drupal_set_message($message = 'Your default language was updated.', $type = 'status');
$path = "/".$lang."/node/233";
header("location: $path");
exit();
}
?>


Language settings
This account's preferred language for site presentation.



Indéfini

Pages

S'abonner à RSS - Public