You are here

function i18n_user in Internationalization 5.2

Same name and namespace in other branches
  1. 5.3 i18n.module \i18n_user()
  2. 5 i18n.module \i18n_user()
  3. 6 i18n.module \i18n_user()

Implementation of hook_user()

Switch to user's language after login

File

./i18n.module, line 257
Internationalization (i18n) module

Code

function i18n_user($op, &$edit, &$account, $category = NULL) {
  if ($op == 'login' && $account->language) {
    $_SESSION['language'] = $account->language;
    i18n_get_lang($account->language);
  }
}