check password only if one is set

This commit is contained in:
Roland Gruber 2008-12-30 16:39:12 +00:00
parent 8db689fcaa
commit 23e78e73a9
1 changed files with 1 additions and 1 deletions

View File

@ -673,7 +673,7 @@ class inetOrgPerson extends baseModule {
if ( !get_preg($this->attributes['title'][0], 'title')) $errors[] = $this->messages['title'][0]; if ( !get_preg($this->attributes['title'][0], 'title')) $errors[] = $this->messages['title'][0];
if ( !get_preg($this->attributes['employeeType'][0], 'employeeType')) $errors[] = $this->messages['employeeType'][0]; if ( !get_preg($this->attributes['employeeType'][0], 'employeeType')) $errors[] = $this->messages['employeeType'][0];
if ( !get_preg($this->attributes['businessCategory'][0], 'businessCategory')) $errors[] = $this->messages['businessCategory'][0]; if ( !get_preg($this->attributes['businessCategory'][0], 'businessCategory')) $errors[] = $this->messages['businessCategory'][0];
if (isset($_POST['userPassword'])) { if (isset($_POST['userPassword']) && ($_POST['userPassword'] != '')) {
if ($_POST['userPassword'] != $_POST['userPassword2']) { if ($_POST['userPassword'] != $_POST['userPassword2']) {
$errors[] = $this->messages['userPassword'][0]; $errors[] = $this->messages['userPassword'][0];
} }