You are here

function admin_language_user_update in Administration Language 7

Implements hook_user_update().

File

./admin_language.module, line 357
Makes admin pages be displayed in the administrator's preferred language.

Code

function admin_language_user_update(&$edit, $account, $category) {
  if (!empty($edit['admin_language'])) {
    db_delete('admin_language')
      ->condition('uid', $account->uid)
      ->execute();
    db_insert('admin_language')
      ->fields(array(
      'uid' => $account->uid,
      'language' => $edit['admin_language'],
    ))
      ->execute();
  }
}