Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c9fc36fc
Commit
c9fc36fc
authored
Feb 19, 2002
by
Kjartan
Browse files
- made username check case insensitive.
parent
aa256d36
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/user.module
View file @
c9fc36fc
...
...
@@ -171,7 +171,7 @@ function user_validate_name($name) {
if
(
ereg
(
"
\$
"
,
$name
))
return
t
(
"The Username cannot end with a space."
);
if
(
ereg
(
" "
,
$name
))
return
t
(
"The Username cannot contain multiple spaces in a row."
);
// if (ereg("[^a-zA-Z0-9@-@]", $name)) return t("The Username contains an illegal character.");
if
(
!
ereg
(
'^[a-z0-9]+(@[a-z0-9]+)?$'
,
$name
))
return
t
(
"The name contains an illegal character."
);
if
(
!
ereg
i
(
'^[a-z0-9]+(@[a-z0-9]+)?$'
,
$name
))
return
t
(
"The name contains an illegal character."
);
if
(
strlen
(
$name
)
>
56
)
return
t
(
"The Username '
$name
' is too long: it must be less than 56 characters."
);
}
...
...
modules/user/user.module
View file @
c9fc36fc
...
...
@@ -171,7 +171,7 @@ function user_validate_name($name) {
if
(
ereg
(
"
\$
"
,
$name
))
return
t
(
"The Username cannot end with a space."
);
if
(
ereg
(
" "
,
$name
))
return
t
(
"The Username cannot contain multiple spaces in a row."
);
// if (ereg("[^a-zA-Z0-9@-@]", $name)) return t("The Username contains an illegal character.");
if
(
!
ereg
(
'^[a-z0-9]+(@[a-z0-9]+)?$'
,
$name
))
return
t
(
"The name contains an illegal character."
);
if
(
!
ereg
i
(
'^[a-z0-9]+(@[a-z0-9]+)?$'
,
$name
))
return
t
(
"The name contains an illegal character."
);
if
(
strlen
(
$name
)
>
56
)
return
t
(
"The Username '
$name
' is too long: it must be less than 56 characters."
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment