Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
b2e0e09f
Commit
b2e0e09f
authored
Oct 17, 2006
by
Nigel McNie
Committed by
Nigel McNie
Oct 17, 2006
Browse files
Added a function for validating that a username is valid for the system.
parent
2f1c2463
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/mahara.php
View file @
b2e0e09f
...
...
@@ -608,4 +608,13 @@ function check_dir_exists($dir, $create=true, $recursive=true) {
return
$status
;
}
/**
* Checks that a username is in valid form
*
* @todo need such a function for password too.
*/
function
validate_username
(
$username
)
{
return
preg_match
(
'/^[a-zA-Z0-9_\.@]+$/'
,
$username
);
}
?>
Write
Preview
Supports
Markdown
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