fixed check for uppercase user names (3416180)
This commit is contained in:
parent
933d8224b8
commit
bb761b1cf6
|
@ -708,13 +708,21 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
if (isset($_POST['removePassword'])) {
|
if (isset($_POST['removePassword'])) {
|
||||||
unset($this->attributes['userPassword']);
|
unset($this->attributes['userPassword']);
|
||||||
}
|
}
|
||||||
$this->attributes['uid'][0] = $_POST['uid'];
|
|
||||||
$this->attributes['cn'][0] = $_POST['cn'];
|
$this->attributes['cn'][0] = $_POST['cn'];
|
||||||
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] = $_POST['uidNumber'];
|
||||||
$this->attributes['gidNumber'][0] = $_POST['gidNumber'];
|
$this->attributes['gidNumber'][0] = $_POST['gidNumber'];
|
||||||
|
if ($this->get_scope()=='user') {
|
||||||
|
if (($this->attributes['uid'][0] != $_POST['uid']) && !get_preg($_POST['uid'], '!upper')) {
|
||||||
|
$errors[] = $this->messages['uid'][1];
|
||||||
|
}
|
||||||
|
if ( !get_preg($this->attributes['homeDirectory'][0], 'homeDirectory' )) {
|
||||||
|
$errors[] = $this->messages['homeDirectory'][0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->attributes['uid'][0] = $_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') {
|
||||||
|
@ -755,12 +763,6 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($this->get_scope()=='user') {
|
|
||||||
if (($this->attributes['uid'][0] != $_POST['uid']) && !get_preg($_POST['uid'], '!upper'))
|
|
||||||
$errors[] = $this->messages['uid'][1];
|
|
||||||
if ( !get_preg($this->attributes['homeDirectory'][0], 'homeDirectory' ))
|
|
||||||
$errors[] = $this->messages['homeDirectory'][0];
|
|
||||||
}
|
|
||||||
// Create automatic useraccount with number if original user already exists
|
// Create automatic useraccount with number if original user already exists
|
||||||
// Reset name to original name if new name is in use
|
// Reset name to original name if new name is in use
|
||||||
// Set username back to original name if new username is in use
|
// Set username back to original name if new username is in use
|
||||||
|
|
Loading…
Reference in New Issue