language = $new_lang_id; $user->save(); // let other plugins know we updated the language elgg_trigger_event("update", "language", $user); } } forward(REFERER);