do not force user/group names to start with letter in group/user list

This commit is contained in:
Roland Gruber 2009-11-22 11:37:31 +00:00
parent b5aee1fb36
commit d6d7e55b73
1 changed files with 3 additions and 3 deletions

View File

@ -402,14 +402,14 @@ function get_preg($argument, $regexp) {
case 'password':
$pregexpr = '/^([[:alnum:]\\^\\ \\|\\#\\*\\,\\.\\;\\:\\_\\+\\!\\%\\&\\/\\?\\{\\(\\)\\}\\[\\]\\$@=-])*$/u';
break;
case 'groupname': // first character must be a letter. All letters, numbers, space and ._- are allowed characters
case 'username': // first character must be a letter. All letters, numbers, space and ._- are allowed characters
case 'groupname': // all letters, numbers, space and ._- are allowed characters
case 'username':
case 'hostname':
$pregexpr = '/^([[:alnum:]@\\.\\ \\_\\$-])+$/u';
break;
case 'usernameList': // comma separated list of user names
case 'groupnameList': // comma separated list of group names
$pregexpr = '/^[[:alpha:]]([[:alnum:]@\\.\\ \\_-])*(,[[:alpha:]]([[:alnum:]@\\.\\ \\_-])*)*$/u';
$pregexpr = '/^([[:alnum:]@\\.\\ \\_-])+(,([[:alnum:]@\\.\\ \\_-])+)*$/u';
break;
case 'realname': // Allow all but \, <, >, =, $, ?
case 'cn':