Please select To the mobile version | Continue to access the desktop computer version
| | Game| Social| Search|
| | |

Msg2me Connecting the world

 Forgot password?
 Register
Search
View: 2402|Reply: 10

only allow digital alphabet in username

[Copy link]
Post time: 12-12-2009 22:14
| Show all posts |Read mode
dz 7.2
Guest, if you want to see the hidden content, please Reply
Post time: 14-12-2009 01:10
| Show all posts
this is about what...?
 Author| Post time: 14-12-2009 08:18
| Show all posts
a method of preventing spammers, it usually use chinese or strange characters.

it should filter most spammers as tested.
Post time: 27-1-2010 18:42
| Show all posts
You must reply to view hidden information
Post time: 6-2-2010 15:07
| Show all posts
You must reply to view hidden information
Post time: 22-4-2010 08:41
| Show all posts
Thanks for sharing nice info
Post time: 17-5-2010 10:12
| Show all posts
really nice... thanks..
Post time: 17-5-2010 17:12
| Show all posts
You must reply to view hidden information
Post time: 12-8-2010 08:57
| Show all posts
nice to prevent spamer.good.thank
Post time: 3-2-2012 17:42
| Show all posts
It must be modified when the server runs with PHP 5.3+!

ajax.php
  1. if(!preg_match("/^[[:alnum:]]+$/i", $username))
  2.     {
  3.     $ucresult = -2;
  4.     }else{
  5.     $ucresult = uc_user_checkname($username);
  6.     }
Copy the Code
register.php
  1. if(!preg_match("/^[[:alnum:]]+$/i", $username))
  2.     {
  3.     showmessage('profile_username_protect');
  4.     }
Copy the Code

QQ|Msg2me    

© 2014 Msg2me | Msg2me provides official English version and support for Comsenz.
Powered by Discuz! X3.2 ML
Quick Reply To Top Return to the list