diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-02 17:55:41 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-02 17:55:41 -0700 |
commit | b8a9581acb3525c6c1c8dc872dd93cfba89c6dd8 (patch) | |
tree | 0e89bba73160c62ef63333d9ae0f92c3b29d3e75 /mod/register.php | |
parent | 336aea26dc398dd38ff121c6b7d3b9559fcc8701 (diff) | |
download | volse-hubzilla-b8a9581acb3525c6c1c8dc872dd93cfba89c6dd8.tar.gz volse-hubzilla-b8a9581acb3525c6c1c8dc872dd93cfba89c6dd8.tar.bz2 volse-hubzilla-b8a9581acb3525c6c1c8dc872dd93cfba89c6dd8.zip |
force lowercase nickname
Diffstat (limited to 'mod/register.php')
-rw-r--r-- | mod/register.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mod/register.php b/mod/register.php index b15ca4fb2..d65c154a8 100644 --- a/mod/register.php +++ b/mod/register.php @@ -74,7 +74,8 @@ function register_post(&$a) { if($r !== false && count($r)) $err .= t(' Your email address is already registered on this system.') ; - if(! preg_match("/^[a-zA-Z][a-zA-Z0-9\-\_]*$/",$nickname)) + $nickname = strtolower($nickname); + if(! preg_match("/^[a-z][a-z0-9\-\_]*$/",$nickname)) $err .= t(' Nickname <strong>must</strong> start with a letter and contain only letters, numbers, dashes, or underscore.') ; $r = q("SELECT `uid` FROM `user` WHERE `nickname` = '%s' LIMIT 1", |