/**
  * @param CentralAuthUser $globalUser
  * @return string
  */
 private function getUserTableRow(CentralAuthUser $globalUser)
 {
     $rowHtml = '';
     // @TODO: Don't use methods from the special page directly,
     // rather move them somewhere sane
     $sca = new SpecialCentralAuth();
     $sca->setContext($this->getContext());
     $guName = $globalUser->getName();
     $guLink = Linker::link(SpecialPage::getTitleFor('CentralAuth', $guName), htmlspecialchars($guName));
     $guHidden = $sca->formatHiddenLevel($globalUser->getHiddenLevel());
     $accountAge = time() - wfTimestamp(TS_UNIX, $globalUser->getRegistration());
     $guRegister = $sca->prettyTimespan($accountAge);
     $guLocked = $this->msg('centralauth-admin-status-locked-no')->escaped();
     if ($globalUser->isLocked()) {
         $guLocked = $this->msg('centralauth-admin-status-locked-yes')->escaped();
     }
     $guEditCount = htmlspecialchars($this->getLanguage()->formatNum($globalUser->getGlobalEditCount()));
     $guAttachedLocalAccounts = htmlspecialchars($this->getLanguage()->formatNum(count($globalUser->listAttached())));
     $rowHtml .= Html::rawElement('td', array(), Html::input('wpActionTarget[' . $guName . ']', $guName, 'checkbox', array('checked' => 'checked')));
     $rowHtml .= Html::rawElement('td', array(), $guLink);
     $rowHtml .= Html::element('td', array('data-sort-value' => $accountAge), $guRegister);
     $rowHtml .= Html::element('td', array(), $guLocked);
     $rowHtml .= Html::element('td', array(), $guHidden);
     $rowHtml .= Html::element('td', array(), $guEditCount);
     $rowHtml .= Html::element('td', array(), $guAttachedLocalAccounts);
     return $rowHtml;
 }