mirror of
https://github.com/LDAPAccountManager/lam.git
synced 2025-10-03 01:39:33 +02:00
#425 support empty loginShell
This commit is contained in:
parent
37b0f15379
commit
9dd6eda474
1 changed files with 4 additions and 4 deletions
|
@ -558,7 +558,7 @@ class posixAccount extends baseModule implements passwordService, AccountStatusP
|
|||
if (!isset($this->attributes['gidNumber'][0]) || ($this->attributes['gidNumber'][0] == '')) {
|
||||
return false;
|
||||
}
|
||||
return isset($this->attributes['loginShell'][0]) && ($this->attributes['loginShell'][0] != '');
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3540,9 +3540,9 @@ class posixAccount extends baseModule implements passwordService, AccountStatusP
|
|||
// shell
|
||||
if (in_array('loginShell', $fields) && !in_array('loginShell', $readOnlyFields)) {
|
||||
$shelllist = $this->getShells(); // list of all valid shells
|
||||
if (in_array($_POST['posixAccount_loginShell'], $shelllist)
|
||||
&& (!isset($attributes['loginShell']) || ($attributes['loginShell'][0] != $_POST['posixAccount_loginShell']))) {
|
||||
$return['mod']['loginShell'][0] = $_POST['posixAccount_loginShell'];
|
||||
if (in_array($_POST['posixAccount_loginShell'], $shelllist)) {
|
||||
$this->checkSimpleSelfServiceTextField($return, 'loginShell', $attributes, $fields,
|
||||
$readOnlyFields);
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue