added error message for wrong uid numbers in file upload
This commit is contained in:
parent
6b4410cf77
commit
f29d7096bf
|
@ -1126,16 +1126,28 @@ class posixAccount extends baseModule {
|
||||||
$needAutoUID[] = $i;
|
$needAutoUID[] = $i;
|
||||||
}
|
}
|
||||||
elseif (get_preg($rawAccounts[$i][$ids['posixAccount_uid']], 'digit')) {
|
elseif (get_preg($rawAccounts[$i][$ids['posixAccount_uid']], 'digit')) {
|
||||||
if (($this->get_scope() == 'user') &&
|
if ($this->get_scope() == 'user') {
|
||||||
($rawAccounts[$i][$ids['posixAccount_uid']] > $this->moduleSettings['posixAccount_minUID'][0]) &&
|
if (($rawAccounts[$i][$ids['posixAccount_uid']] > $this->moduleSettings['posixAccount_minUID'][0]) &&
|
||||||
($rawAccounts[$i][$ids['posixAccount_uid']] < $this->moduleSettings['posixAccount_maxUID'][0])) {
|
($rawAccounts[$i][$ids['posixAccount_uid']] < $this->moduleSettings['posixAccount_maxUID'][0])) {
|
||||||
$partialAccounts[$i]['uidNumber'] = $rawAccounts[$i][$ids['posixAccount_uid']];
|
$partialAccounts[$i]['uidNumber'] = $rawAccounts[$i][$ids['posixAccount_uid']];
|
||||||
}
|
}
|
||||||
elseif (($this->get_scope() == 'host') &&
|
else {
|
||||||
($rawAccounts[$i][$ids['posixAccount_uid']] > $this->moduleSettings['posixAccount_minMachine'][0]) &&
|
$errMsg = $this->messages['uidNumber'][4];
|
||||||
|
array_push($errMsg, array($i));
|
||||||
|
$errors[] = $errMsg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif ($this->get_scope() == 'host') {
|
||||||
|
if (($rawAccounts[$i][$ids['posixAccount_uid']] > $this->moduleSettings['posixAccount_minMachine'][0]) &&
|
||||||
($rawAccounts[$i][$ids['posixAccount_uid']] < $this->moduleSettings['posixAccount_maxMachine'][0])) {
|
($rawAccounts[$i][$ids['posixAccount_uid']] < $this->moduleSettings['posixAccount_maxMachine'][0])) {
|
||||||
$partialAccounts[$i]['uidNumber'] = $rawAccounts[$i][$ids['posixAccount_uid']];
|
$partialAccounts[$i]['uidNumber'] = $rawAccounts[$i][$ids['posixAccount_uid']];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$errMsg = $this->messages['uidNumber'][4];
|
||||||
|
array_push($errMsg, array($i));
|
||||||
|
$errors[] = $errMsg;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$errMsg = $this->messages['uidNumber'][4];
|
$errMsg = $this->messages['uidNumber'][4];
|
||||||
|
|
Loading…
Reference in New Issue