trim some input fields to prevent copy+paste errors
This commit is contained in:
parent
ed09935d4f
commit
88c1bd9476
|
@ -1035,9 +1035,9 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
$this->attributes['description'] = array_values($this->attributes['description']);
|
$this->attributes['description'] = array_values($this->attributes['description']);
|
||||||
}
|
}
|
||||||
$this->attributes['sn'][0] = $_POST['sn'];
|
$this->attributes['sn'][0] = trim($_POST['sn']);
|
||||||
if (!get_preg($this->attributes['sn'][0], 'realname')) $errors[] = $this->messages['lastname'][0];
|
if (!get_preg($this->attributes['sn'][0], 'realname')) $errors[] = $this->messages['lastname'][0];
|
||||||
$this->attributes['givenName'][0] = $_POST['givenName'];
|
$this->attributes['givenName'][0] = trim($_POST['givenName']);
|
||||||
if (($this->attributes['givenName'][0] != '') && !get_preg($this->attributes['givenName'][0], 'realname')) $errors[] = $this->messages['givenName'][0];
|
if (($this->attributes['givenName'][0] != '') && !get_preg($this->attributes['givenName'][0], 'realname')) $errors[] = $this->messages['givenName'][0];
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideJobTitle')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideJobTitle')) {
|
||||||
$titleCounter = 0;
|
$titleCounter = 0;
|
||||||
|
@ -1059,7 +1059,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideEMailAddress')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideEMailAddress')) {
|
||||||
$mailCounter = 0;
|
$mailCounter = 0;
|
||||||
while (isset($_POST['mail' . $mailCounter])) {
|
while (isset($_POST['mail' . $mailCounter])) {
|
||||||
$this->attributes['mail'][$mailCounter] = $_POST['mail' . $mailCounter];
|
$this->attributes['mail'][$mailCounter] = trim($_POST['mail' . $mailCounter]);
|
||||||
if (($_POST['mail' . $mailCounter] != '') && !get_preg($this->attributes['mail'][$mailCounter], 'email')) $errors[] = $this->messages['email'][0];
|
if (($_POST['mail' . $mailCounter] != '') && !get_preg($this->attributes['mail'][$mailCounter], 'email')) $errors[] = $this->messages['email'][0];
|
||||||
if ($this->attributes['mail'][$mailCounter] == '') {
|
if ($this->attributes['mail'][$mailCounter] == '') {
|
||||||
unset($this->attributes['mail'][$mailCounter]);
|
unset($this->attributes['mail'][$mailCounter]);
|
||||||
|
@ -1074,7 +1074,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideTelephoneNumber')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideTelephoneNumber')) {
|
||||||
$telephoneNumberCounter = 0;
|
$telephoneNumberCounter = 0;
|
||||||
while (isset($_POST['telephoneNumber' . $telephoneNumberCounter])) {
|
while (isset($_POST['telephoneNumber' . $telephoneNumberCounter])) {
|
||||||
$this->attributes['telephoneNumber'][$telephoneNumberCounter] = $_POST['telephoneNumber' . $telephoneNumberCounter];
|
$this->attributes['telephoneNumber'][$telephoneNumberCounter] = trim($_POST['telephoneNumber' . $telephoneNumberCounter]);
|
||||||
if (!get_preg($this->attributes['telephoneNumber'][$telephoneNumberCounter], 'telephone')) $errors[] = $this->messages['telephoneNumber'][0];
|
if (!get_preg($this->attributes['telephoneNumber'][$telephoneNumberCounter], 'telephone')) $errors[] = $this->messages['telephoneNumber'][0];
|
||||||
if ($this->attributes['telephoneNumber'][$telephoneNumberCounter] == '') {
|
if ($this->attributes['telephoneNumber'][$telephoneNumberCounter] == '') {
|
||||||
unset($this->attributes['telephoneNumber'][$telephoneNumberCounter]);
|
unset($this->attributes['telephoneNumber'][$telephoneNumberCounter]);
|
||||||
|
@ -1089,7 +1089,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideMobileNumber')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideMobileNumber')) {
|
||||||
$mobileCounter = 0;
|
$mobileCounter = 0;
|
||||||
while (isset($_POST['mobile' . $mobileCounter])) {
|
while (isset($_POST['mobile' . $mobileCounter])) {
|
||||||
$this->attributes['mobile'][$mobileCounter] = $_POST['mobile' . $mobileCounter];
|
$this->attributes['mobile'][$mobileCounter] = trim($_POST['mobile' . $mobileCounter]);
|
||||||
if (!get_preg($this->attributes['mobile'][$mobileCounter], 'telephone')) $errors[] = $this->messages['mobileTelephone'][0];
|
if (!get_preg($this->attributes['mobile'][$mobileCounter], 'telephone')) $errors[] = $this->messages['mobileTelephone'][0];
|
||||||
if ($this->attributes['mobile'][$mobileCounter] == '') {
|
if ($this->attributes['mobile'][$mobileCounter] == '') {
|
||||||
unset($this->attributes['mobile'][$mobileCounter]);
|
unset($this->attributes['mobile'][$mobileCounter]);
|
||||||
|
@ -1104,7 +1104,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideFaxNumber')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideFaxNumber')) {
|
||||||
$facsimileTelephoneNumberCounter = 0;
|
$facsimileTelephoneNumberCounter = 0;
|
||||||
while (isset($_POST['facsimileTelephoneNumber' . $facsimileTelephoneNumberCounter])) {
|
while (isset($_POST['facsimileTelephoneNumber' . $facsimileTelephoneNumberCounter])) {
|
||||||
$this->attributes['facsimileTelephoneNumber'][$facsimileTelephoneNumberCounter] = $_POST['facsimileTelephoneNumber' . $facsimileTelephoneNumberCounter];
|
$this->attributes['facsimileTelephoneNumber'][$facsimileTelephoneNumberCounter] = trim($_POST['facsimileTelephoneNumber' . $facsimileTelephoneNumberCounter]);
|
||||||
if (!get_preg($this->attributes['facsimileTelephoneNumber'][$facsimileTelephoneNumberCounter], 'telephone')) $errors[] = $this->messages['facsimileNumber'][0];
|
if (!get_preg($this->attributes['facsimileTelephoneNumber'][$facsimileTelephoneNumberCounter], 'telephone')) $errors[] = $this->messages['facsimileNumber'][0];
|
||||||
if ($this->attributes['facsimileTelephoneNumber'][$facsimileTelephoneNumberCounter] == '') {
|
if ($this->attributes['facsimileTelephoneNumber'][$facsimileTelephoneNumberCounter] == '') {
|
||||||
unset($this->attributes['facsimileTelephoneNumber'][$facsimileTelephoneNumberCounter]);
|
unset($this->attributes['facsimileTelephoneNumber'][$facsimileTelephoneNumberCounter]);
|
||||||
|
@ -1119,7 +1119,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideHomeTelephoneNumber')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideHomeTelephoneNumber')) {
|
||||||
$homePhoneCounter = 0;
|
$homePhoneCounter = 0;
|
||||||
while (isset($_POST['homePhone' . $homePhoneCounter])) {
|
while (isset($_POST['homePhone' . $homePhoneCounter])) {
|
||||||
$this->attributes['homePhone'][$homePhoneCounter] = $_POST['homePhone' . $homePhoneCounter];
|
$this->attributes['homePhone'][$homePhoneCounter] = trim($_POST['homePhone' . $homePhoneCounter]);
|
||||||
if (!get_preg($this->attributes['homePhone'][$homePhoneCounter], 'telephone')) $errors[] = $this->messages['homePhone'][0];
|
if (!get_preg($this->attributes['homePhone'][$homePhoneCounter], 'telephone')) $errors[] = $this->messages['homePhone'][0];
|
||||||
if ($this->attributes['homePhone'][$homePhoneCounter] == '') {
|
if ($this->attributes['homePhone'][$homePhoneCounter] == '') {
|
||||||
unset($this->attributes['homePhone'][$homePhoneCounter]);
|
unset($this->attributes['homePhone'][$homePhoneCounter]);
|
||||||
|
@ -1193,7 +1193,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideLabeledURI')) {
|
if (!$this->isBooleanConfigOptionSet('inetOrgPerson_hideLabeledURI')) {
|
||||||
$labeledURICounter = 0;
|
$labeledURICounter = 0;
|
||||||
while (isset($_POST['labeledURI' . $labeledURICounter])) {
|
while (isset($_POST['labeledURI' . $labeledURICounter])) {
|
||||||
$this->attributes['labeledURI'][$labeledURICounter] = $_POST['labeledURI' . $labeledURICounter];
|
$this->attributes['labeledURI'][$labeledURICounter] = trim($_POST['labeledURI' . $labeledURICounter]);
|
||||||
if ($this->attributes['labeledURI'][$labeledURICounter] == '') {
|
if ($this->attributes['labeledURI'][$labeledURICounter] == '') {
|
||||||
unset($this->attributes['labeledURI'][$labeledURICounter]);
|
unset($this->attributes['labeledURI'][$labeledURICounter]);
|
||||||
}
|
}
|
||||||
|
@ -2543,7 +2543,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
if (!in_array("inetOrgPerson", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "inetOrgPerson";
|
if (!in_array("inetOrgPerson", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "inetOrgPerson";
|
||||||
// last name
|
// last name
|
||||||
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_lastName']], 'realname')) {
|
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_lastName']], 'realname')) {
|
||||||
$partialAccounts[$i]['sn'] = $rawAccounts[$i][$ids['inetOrgPerson_lastName']];
|
$partialAccounts[$i]['sn'] = trim($rawAccounts[$i][$ids['inetOrgPerson_lastName']]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$errMsg = $this->messages['lastname'][1];
|
$errMsg = $this->messages['lastname'][1];
|
||||||
|
@ -2553,7 +2553,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
// first name
|
// first name
|
||||||
if ($rawAccounts[$i][$ids['inetOrgPerson_firstName']] != "") {
|
if ($rawAccounts[$i][$ids['inetOrgPerson_firstName']] != "") {
|
||||||
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_firstName']], 'realname')) {
|
if (get_preg($rawAccounts[$i][$ids['inetOrgPerson_firstName']], 'realname')) {
|
||||||
$partialAccounts[$i]['givenName'] = $rawAccounts[$i][$ids['inetOrgPerson_firstName']];
|
$partialAccounts[$i]['givenName'] = trim($rawAccounts[$i][$ids['inetOrgPerson_firstName']]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$errMsg = $this->messages['givenName'][1];
|
$errMsg = $this->messages['givenName'][1];
|
||||||
|
@ -2711,7 +2711,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
// telephone
|
// telephone
|
||||||
if (isset($ids['inetOrgPerson_telephone']) && ($rawAccounts[$i][$ids['inetOrgPerson_telephone']] != "")) {
|
if (isset($ids['inetOrgPerson_telephone']) && ($rawAccounts[$i][$ids['inetOrgPerson_telephone']] != "")) {
|
||||||
$telephoneList = preg_split('/;[ ]*/', $rawAccounts[$i][$ids['inetOrgPerson_telephone']]);
|
$telephoneList = preg_split('/;[ ]*/', trim($rawAccounts[$i][$ids['inetOrgPerson_telephone']]));
|
||||||
$partialAccounts[$i]['telephoneNumber'] = $telephoneList;
|
$partialAccounts[$i]['telephoneNumber'] = $telephoneList;
|
||||||
for ($x = 0; $x < sizeof($telephoneList); $x++) {
|
for ($x = 0; $x < sizeof($telephoneList); $x++) {
|
||||||
if (!get_preg($telephoneList[$x], 'telephone')) {
|
if (!get_preg($telephoneList[$x], 'telephone')) {
|
||||||
|
@ -2724,7 +2724,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
// home telephone
|
// home telephone
|
||||||
if (isset($ids['inetOrgPerson_homePhone']) && ($rawAccounts[$i][$ids['inetOrgPerson_homePhone']] != "")) {
|
if (isset($ids['inetOrgPerson_homePhone']) && ($rawAccounts[$i][$ids['inetOrgPerson_homePhone']] != "")) {
|
||||||
$homePhoneList = preg_split('/;[ ]*/', $rawAccounts[$i][$ids['inetOrgPerson_homePhone']]);
|
$homePhoneList = preg_split('/;[ ]*/', trim($rawAccounts[$i][$ids['inetOrgPerson_homePhone']]));
|
||||||
$partialAccounts[$i]['homePhone'] = $homePhoneList;
|
$partialAccounts[$i]['homePhone'] = $homePhoneList;
|
||||||
for ($x = 0; $x < sizeof($homePhoneList); $x++) {
|
for ($x = 0; $x < sizeof($homePhoneList); $x++) {
|
||||||
if (!get_preg($homePhoneList[$x], 'telephone')) {
|
if (!get_preg($homePhoneList[$x], 'telephone')) {
|
||||||
|
@ -2737,7 +2737,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
// mobile
|
// mobile
|
||||||
if (isset($ids['inetOrgPerson_mobile']) && ($rawAccounts[$i][$ids['inetOrgPerson_mobile']] != "")) {
|
if (isset($ids['inetOrgPerson_mobile']) && ($rawAccounts[$i][$ids['inetOrgPerson_mobile']] != "")) {
|
||||||
$mobileList = preg_split('/;[ ]*/', $rawAccounts[$i][$ids['inetOrgPerson_mobile']]);
|
$mobileList = preg_split('/;[ ]*/', trim($rawAccounts[$i][$ids['inetOrgPerson_mobile']]));
|
||||||
$partialAccounts[$i]['mobile'] = $mobileList;
|
$partialAccounts[$i]['mobile'] = $mobileList;
|
||||||
for ($x = 0; $x < sizeof($mobileList); $x++) {
|
for ($x = 0; $x < sizeof($mobileList); $x++) {
|
||||||
if (!get_preg($mobileList[$x], 'telephone')) {
|
if (!get_preg($mobileList[$x], 'telephone')) {
|
||||||
|
@ -2750,7 +2750,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
// facsimile
|
// facsimile
|
||||||
if (isset($ids['inetOrgPerson_fax']) && ($rawAccounts[$i][$ids['inetOrgPerson_fax']] != "")) {
|
if (isset($ids['inetOrgPerson_fax']) && ($rawAccounts[$i][$ids['inetOrgPerson_fax']] != "")) {
|
||||||
$facsimileTelephoneNumberList = preg_split('/;[ ]*/', $rawAccounts[$i][$ids['inetOrgPerson_fax']]);
|
$facsimileTelephoneNumberList = preg_split('/;[ ]*/', trim($rawAccounts[$i][$ids['inetOrgPerson_fax']]));
|
||||||
$partialAccounts[$i]['facsimileTelephoneNumber'] = $facsimileTelephoneNumberList;
|
$partialAccounts[$i]['facsimileTelephoneNumber'] = $facsimileTelephoneNumberList;
|
||||||
for ($x = 0; $x < sizeof($facsimileTelephoneNumberList); $x++) {
|
for ($x = 0; $x < sizeof($facsimileTelephoneNumberList); $x++) {
|
||||||
if (!get_preg($facsimileTelephoneNumberList[$x], 'telephone')) {
|
if (!get_preg($facsimileTelephoneNumberList[$x], 'telephone')) {
|
||||||
|
@ -2763,7 +2763,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
// eMail
|
// eMail
|
||||||
if (isset($ids['inetOrgPerson_email']) && ($rawAccounts[$i][$ids['inetOrgPerson_email']] != "")) {
|
if (isset($ids['inetOrgPerson_email']) && ($rawAccounts[$i][$ids['inetOrgPerson_email']] != "")) {
|
||||||
$mailList = preg_split('/;[ ]*/', $rawAccounts[$i][$ids['inetOrgPerson_email']]);
|
$mailList = preg_split('/;[ ]*/', trim($rawAccounts[$i][$ids['inetOrgPerson_email']]));
|
||||||
$partialAccounts[$i]['mail'] = $mailList;
|
$partialAccounts[$i]['mail'] = $mailList;
|
||||||
for ($x = 0; $x < sizeof($mailList); $x++) {
|
for ($x = 0; $x < sizeof($mailList); $x++) {
|
||||||
if (!get_preg($mailList[$x], 'email')) {
|
if (!get_preg($mailList[$x], 'email')) {
|
||||||
|
@ -2783,7 +2783,7 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
// labeledURI
|
// labeledURI
|
||||||
if (isset($ids['inetOrgPerson_labeledURI']) && ($rawAccounts[$i][$ids['inetOrgPerson_labeledURI']] != "")) {
|
if (isset($ids['inetOrgPerson_labeledURI']) && ($rawAccounts[$i][$ids['inetOrgPerson_labeledURI']] != "")) {
|
||||||
$partialAccounts[$i]['labeledURI'] = preg_split('/;[ ]*/', $rawAccounts[$i][$ids['inetOrgPerson_labeledURI']]);
|
$partialAccounts[$i]['labeledURI'] = preg_split('/;[ ]*/', trim($rawAccounts[$i][$ids['inetOrgPerson_labeledURI']]));
|
||||||
}
|
}
|
||||||
if (!in_array('posixAccount', $selectedModules)) {
|
if (!in_array('posixAccount', $selectedModules)) {
|
||||||
// cn
|
// cn
|
||||||
|
|
|
@ -910,7 +910,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
if (!$this->isBooleanConfigOptionSet('posixAccount_hidegecos')) {
|
if (!$this->isBooleanConfigOptionSet('posixAccount_hidegecos')) {
|
||||||
if (isset($_POST['gecos'])) $this->attributes['gecos'][0] = $_POST['gecos'];
|
if (isset($_POST['gecos'])) $this->attributes['gecos'][0] = $_POST['gecos'];
|
||||||
}
|
}
|
||||||
if (isset($this->orig['uid'][0]) && ($this->orig['uid'][0] != '') && ($_POST['uid'] != $this->attributes['uid'][0])) {
|
if (isset($this->orig['uid'][0]) && ($this->orig['uid'][0] != '') && (trim($_POST['uid']) != $this->attributes['uid'][0])) {
|
||||||
$errors[] = $this->messages['uid'][0];
|
$errors[] = $this->messages['uid'][0];
|
||||||
}
|
}
|
||||||
if (isset($this->orig['gidNumber'][0]) && ($this->orig['gidNumber'][0] != '') && ($_POST['gidNumber'] != $this->attributes['gidNumber'][0])) {
|
if (isset($this->orig['gidNumber'][0]) && ($this->orig['gidNumber'][0] != '') && ($_POST['gidNumber'] != $this->attributes['gidNumber'][0])) {
|
||||||
|
@ -918,7 +918,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
$errorMessage[] = array($this->orig['gidNumber'][0], $this->orig['uidNumber'][0], $_POST['gidNumber']);
|
$errorMessage[] = array($this->orig['gidNumber'][0], $this->orig['uidNumber'][0], $_POST['gidNumber']);
|
||||||
$errors[] = $errorMessage;
|
$errors[] = $errorMessage;
|
||||||
}
|
}
|
||||||
if (isset($this->orig['uidNumber'][0]) && $this->orig['uidNumber'][0]!='' && $_POST['uidNumber']!=$this->attributes['uidNumber'][0]) {
|
if (isset($this->orig['uidNumber'][0]) && $this->orig['uidNumber'][0]!='' && trim($_POST['uidNumber'])!=$this->attributes['uidNumber'][0]) {
|
||||||
$errorMessage = $this->messages['uidNumber'][5];
|
$errorMessage = $this->messages['uidNumber'][5];
|
||||||
$errorMessage[] = array($this->orig['uidNumber'][0], $_POST['uidNumber']);
|
$errorMessage[] = array($this->orig['uidNumber'][0], $_POST['uidNumber']);
|
||||||
$errors[] = $errorMessage;
|
$errors[] = $errorMessage;
|
||||||
|
@ -958,7 +958,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
if (!get_preg($this->attributes['cn'][0], 'cn')) {
|
if (!get_preg($this->attributes['cn'][0], 'cn')) {
|
||||||
$errors[] = $this->messages['cn'][0];
|
$errors[] = $this->messages['cn'][0];
|
||||||
}
|
}
|
||||||
$this->attributes['uidNumber'][0] = $_POST['uidNumber'];
|
$this->attributes['uidNumber'][0] = trim($_POST['uidNumber']);
|
||||||
$this->attributes['gidNumber'][0] = $_POST['gidNumber'];
|
$this->attributes['gidNumber'][0] = $_POST['gidNumber'];
|
||||||
if ($this->get_scope()=='user') {
|
if ($this->get_scope()=='user') {
|
||||||
if (($this->attributes['uid'][0] != $_POST['uid']) && !get_preg($_POST['uid'], '!upper')) {
|
if (($this->attributes['uid'][0] != $_POST['uid']) && !get_preg($_POST['uid'], '!upper')) {
|
||||||
|
@ -968,7 +968,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
$errors[] = $this->messages['homeDirectory'][0];
|
$errors[] = $this->messages['homeDirectory'][0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->attributes['uid'][0] = $_POST['uid'];
|
$this->attributes['uid'][0] = trim($_POST['uid']);
|
||||||
// Check if UID is valid. If none value was entered, the next useable value will be inserted
|
// Check if UID is valid. If none value was entered, the next useable value will be inserted
|
||||||
// load min and may uidNumber
|
// load min and may uidNumber
|
||||||
if ($this->get_scope()=='user') {
|
if ($this->get_scope()=='user') {
|
||||||
|
@ -1031,7 +1031,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Show warning if LAM has changed username
|
// Show warning if LAM has changed username
|
||||||
if ($this->attributes['uid'][0] != $_POST['uid']) {
|
if ($this->attributes['uid'][0] != trim($_POST['uid'])) {
|
||||||
if ($this->get_scope()=='user') $errors[] = $this->messages['uid'][5];
|
if ($this->get_scope()=='user') $errors[] = $this->messages['uid'][5];
|
||||||
if ($this->get_scope()=='host') $errors[] = $this->messages['uid'][6];
|
if ($this->get_scope()=='host') $errors[] = $this->messages['uid'][6];
|
||||||
}
|
}
|
||||||
|
@ -1787,7 +1787,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
if ($this->get_scope() == 'user') {
|
if ($this->get_scope() == 'user') {
|
||||||
if (($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'] = trim($rawAccounts[$i][$ids['posixAccount_uid']]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$errMsg = $this->messages['uidNumber'][4];
|
$errMsg = $this->messages['uidNumber'][4];
|
||||||
|
@ -1798,7 +1798,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
elseif ($this->get_scope() == 'host') {
|
elseif ($this->get_scope() == 'host') {
|
||||||
if (($rawAccounts[$i][$ids['posixAccount_uid']] > $this->moduleSettings['posixAccount_minMachine'][0]) &&
|
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'] = trim($rawAccounts[$i][$ids['posixAccount_uid']]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$errMsg = $this->messages['uidNumber'][4];
|
$errMsg = $this->messages['uidNumber'][4];
|
||||||
|
|
Loading…
Reference in New Issue