allow @ in user names
This commit is contained in:
parent
8b8a5c8195
commit
cc7c8f8b82
|
@ -396,11 +396,11 @@ function get_preg($argument, $regexp) {
|
|||
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
|
||||
$pregexpr = '/^[[:alpha:]]([[:alnum:]\\.\\ \\_-])*$/u';
|
||||
$pregexpr = '/^[[:alpha:]]([[: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 = '/^[[:alpha:]]([[:alnum:]@\\.\\ \\_-])*(,[[:alpha:]]([[:alnum:]@\\.\\ \\_-])*)*$/u';
|
||||
break;
|
||||
case 'hostname': // first character must be letter, last must be $. Only normal letters, numbers and ._- are allowed
|
||||
$pregexpr = '/^[a-zA-Z]([a-zA-Z0-9\\.\\_-])*\\$$/u';
|
||||
|
@ -427,7 +427,7 @@ function get_preg($argument, $regexp) {
|
|||
$pregexpr = '/^[^\\\<>=\\$\\?]*$/';
|
||||
break;
|
||||
case "homeDirectory": // Homapath, /path/......
|
||||
$pregexpr = '/^([\/]([[:alnum:]\\$\\.\\ \\_-])+)+(\/)?$/u';
|
||||
$pregexpr = '/^([\/]([[:alnum:]@\\$\\.\\ \\_-])+)+(\/)?$/u';
|
||||
break;
|
||||
case "digit": // Normal number
|
||||
$pregexpr = '/^[[:digit:]]*$/';
|
||||
|
|
Loading…
Reference in New Issue