You are here

function admin_language_user_load in Administration Language 7

Implements hook_user_load().

File

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

Code

function admin_language_user_load($users) {
  $query = db_select('admin_language', 'al')
    ->fields('al')
    ->condition('uid', array_keys($users), 'IN');
  $result = $query
    ->execute();
  while ($record = $result
    ->fetchObject()) {
    $users[$record->uid]->admin_language = $record->language;
  }
}