diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 4f94211d..3def19ac 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -345,8 +345,13 @@ class posixAccount extends baseModule implements passwordService { ); } // available PDF fields - $return['PDF_fields'] = array( - 'uid' => _('User name'), + if ($this->get_scope() == 'host') { + $return['PDF_fields'] = array('uid' => _('Host name')); + } + else { + $return['PDF_fields'] = array('uid' => _('User name')); + } + $return['PDF_fields'] = array_merge($return['PDF_fields'], array( 'uidNumber' => _('UID number'), 'gidNumber' => _('GID number'), 'gecos' => _('Gecos'), @@ -356,7 +361,7 @@ class posixAccount extends baseModule implements passwordService { 'loginShell' => _('Login shell'), 'cn' => _('Common name'), 'userPassword' => _('Password') - ); + )); if (self::areGroupOfNamesActive()) { $return['PDF_fields']['gon'] = _('Group of names'); } @@ -1145,7 +1150,11 @@ class posixAccount extends baseModule implements passwordService { $userName = ''; if (isset($this->attributes['uid'][0])) $userName = $this->attributes['uid'][0]; - $uidInput = new htmlTableExtendedInputField(_("User name"), 'uid', $userName, 'uid'); + $uidLabel = _("User name"); + if ($this->get_scope() == 'host') { + $uidLabel = _("Host name"); + } + $uidInput = new htmlTableExtendedInputField($uidLabel, 'uid', $userName, 'uid'); $uidInput->setRequired(true); $uidInput->setFieldMaxLength(100); $return->addElement($uidInput, true); @@ -1524,8 +1533,12 @@ class posixAccount extends baseModule implements passwordService { * @return array list of possible PDF entries */ function get_pdfEntries() { + $uidLabel = _('User name'); + if ($this->get_scope() == 'host') { + $uidLabel = _('Host name'); + } $return = array( - 'posixAccount_uid' => array('' . _('User name') . '' . $this->attributes['uid'][0] . ''), + 'posixAccount_uid' => array('' . $uidLabel . '' . $this->attributes['uid'][0] . ''), 'posixAccount_cn' => array('' . _('Common name') . '' . $this->attributes['cn'][0] . ''), 'posixAccount_uidNumber' => array('' . _('UID number') . '' . $this->attributes['uidNumber'][0] . ''), 'posixAccount_gidNumber' => array('' . _('GID number') . '' . $this->attributes['gidNumber'][0] . ''),