Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
b2e0e09f
Commit
b2e0e09f
authored
Oct 17, 2006
by
Nigel McNie
Committed by
Nigel McNie
Oct 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a function for validating that a username is valid for the system.
parent
2f1c2463
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
htdocs/lib/mahara.php
htdocs/lib/mahara.php
+9
-0
No files found.
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
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