Welcome to Geeklog, Anonymous Wednesday, February 01 2023 @ 04:54 pm 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:

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
 Quote

All times are EST. The time is now 04:54 pm.

  • 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