diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 13f34bb5..c4273e22 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -1467,12 +1467,14 @@ class posixAccount extends baseModule implements passwordService { '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] . ''), - 'posixAccount_gecos' => array('' . _('Gecos') . '' . $this->attributes['gecos'][0] . ''), 'posixAccount_primaryGroup' => array('' . _('Primary group') . '' . $this->getGroupName($this->attributes['gidNumber'][0]) . ''), 'posixAccount_additionalGroups' => array('' . _('Additional groups') . '' . implode(", ", $this->groups) . ''), 'posixAccount_homeDirectory' => array('' . _('Home directory') . '' . $this->attributes['homeDirectory'][0] . ''), 'posixAccount_loginShell' => array('' . _('Login shell') . '' . $this->attributes['loginShell'][0] . ''), ); + if (isset($this->attributes['gecos'][0])) { + $return['posixAccount_gecos'] = array('' . _('Gecos') . '' . $this->attributes['gecos'][0] . ''); + } if ($this->areGroupOfNamesActive()) { $allGons = $this->findGroupOfNames(); $gons = array();