Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 03:29 am EST
Geeklog Forums
Username VS spaces (and other characters)
Status: offline
tmarquez
Forum User
Regular Poster
Registered: 06/17/03
Posts: 70
Call me anal, but I can not stand usernames with spaces. Obviously, they're not a problem for GeekLog, but I often find my sites users can NOT remember their usernames when they use spaces. So, after much searching through the forums, I decided to put this little hack up. This one line of code tests the $username in the file users.php to make sure it doesn't have any spaces or any other nasty characters.
In users.php find this line of code on line 467:
if (empty ($username)) {
Replace with:
if (empty ($username) || preg_match('~[<>&"\'=\\\]|[[:space:]]~', $username)) {
NOTE: Remember to always back up files before attempting these hacks.
T.Marquez Jr. -
Webmaster -
www.indianapolisfilm.net - Geeklog 1.4.0sr5-1
In users.php find this line of code on line 467:
Text Formatted Code
if (empty ($username)) {
Replace with:
Text Formatted Code
if (empty ($username) || preg_match('~[<>&"\'=\\\]|[[:space:]]~', $username)) {
NOTE: Remember to always back up files before attempting these hacks.
T.Marquez Jr. -
Webmaster -
www.indianapolisfilm.net - Geeklog 1.4.0sr5-1
10
11
Quote
All times are EST. The time is now 03:29 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content