From 655b72d1f2c77dc683a0b19ea73f3e3c81eb31ee Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 23 Apr 2004 15:51:11 +0000 Subject: [PATCH] fixed underscore bug --- lam-0.4/templates/account/hostedit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lam-0.4/templates/account/hostedit.php b/lam-0.4/templates/account/hostedit.php index f2c7165d..96688c2d 100644 --- a/lam-0.4/templates/account/hostedit.php +++ b/lam-0.4/templates/account/hostedit.php @@ -133,7 +133,7 @@ switch ($_POST['select']) { // Get copy of hostname so we can check if changes were made $tempname = $account_new->general_username; // Check if Hostname contains only valid characters - if ( !ereg('^([a-z]|[A-Z]|[0-9]|[.]|[-]|[$])*$', $account_new->general_username)) + if ( !eregi('^([a-z0-9_]|[.]|[-]|[$])*$', $account_new->general_username)) $errors[] = array('ERROR', _('Host name'), _('Hostname contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !')); // Create automatic Hostname with number if original host already exists @@ -178,7 +178,7 @@ switch ($_POST['select']) { // Check if Name-length is OK. minLength=3, maxLength=20 if ( !ereg('.{3,20}', $account_new->general_username)) $errors[] = array('ERROR', _('Name'), _('Name must contain between 3 and 20 characters.')); // Check if Name starts with letter - if ( !ereg('^([a-z]|[A-Z]).*$', $account_new->general_username)) + if ( !eregi('^([a-z]).*$', $account_new->general_username)) $errors[] = array('ERROR', _('Name'), _('Name contains invalid characters. First character must be a letter.')); // Set gecos-field to hostname if it's empty if ($account_new->general_gecos=='') {