From a5036782bdb6aec318538af1a34657e5f68490c5 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 21 Nov 2019 19:57:45 +0100 Subject: [PATCH] added "cn" to profile options --- lam/lib/modules/posixAccount.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 7c6e333e..192bc0c1 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -1991,6 +1991,10 @@ class posixAccount extends baseModule implements passwordService { $gonSelect->setTransformSingleSelect(false); $return->add($gonSelect, 12); } + // common name + if ($this->manageCn($modules)) { + $return->add(new htmlResponsiveInputField(_('Common name'), 'posixAccount_cn', '', 'cn'), 12); + } // home directory $return->add(new htmlResponsiveInputField(_('Home directory'), 'posixAccount_homeDirectory', '/home/$user', 'homeDirectory'), 12); // login shell @@ -2026,6 +2030,10 @@ class posixAccount extends baseModule implements passwordService { parent::load_profile($profile); $modules = $this->getAccountContainer()->get_type()->getModules(); $typeId = $this->getAccountContainer()->get_type()->getId(); + // cn + if ($this->manageCn($modules) && !empty($profile['posixAccount_cn'][0])) { + $this->attributes['cn'][0] = $profile['posixAccount_cn'][0]; + } // home directory $homeDirAttr = $this->getHomedirAttrName($modules); if (!empty($profile['posixAccount_homeDirectory'][0])) {