diff --git a/html/inc/bootstrap.inc b/html/inc/bootstrap.inc index d32f01f9f9..0600cdd054 100644 --- a/html/inc/bootstrap.inc +++ b/html/inc/bootstrap.inc @@ -301,17 +301,17 @@ define('FORM_LEFT_CLASS', 'col-sm-4'); define('FORM_LEFT_OFFSET', 'col-sm-offset-4'); define('FORM_RIGHT_CLASS', 'col-sm-8'); -function form_input_text($label, $name, $value='', $type='text', $attrs='') { +function form_input_text($label, $name, $value='', $type='text', $attrs='', $extra='') { echo sprintf('
- + %s
', FORM_LEFT_CLASS, $label, FORM_RIGHT_CLASS, - $attrs, $type, $name, $value + $attrs, $type, $name, $value, $extra ); } diff --git a/html/inc/user_util.inc b/html/inc/user_util.inc index 529cd43112..76283e8ab7 100644 --- a/html/inc/user_util.inc +++ b/html/inc/user_util.inc @@ -175,8 +175,8 @@ function validate_post_make_user() { } $passwd = post_str("passwd"); - $passwd2 = post_str("passwd2"); - if ($passwd != $passwd2) { + $passwd2 = post_str("passwd2", true); + if ($passwd2 && ($passwd != $passwd2)) { show_error(tra("New passwords are different")); }