Author Topic: Space in username  (Read 187 times)

happy

  • Prime Member
  • ****
  • Posts: 146
  • Karma: +0/-1
Space in username
« on: April 03, 2018, 05:56:54 AM »
Hi Maverick

There is one more issue, username is allowing space which should not be allowed.

How to handle it please guide

Thank you

maverick

  • Administrator
  • Veteran Member
  • *****
  • Posts: 3108
  • Karma: +210/-7
    • Maverick Webworks
Re: Space in username
« Reply #1 on: April 03, 2018, 09:04:25 AM »
In the processors/join.php file look for the following on about line #39:
Code: [Select]
if (!preg_match('/^[a-z0-9]+(?:[\w \-]*[a-z0-9]+)*$/',$input['user']) || strlen($input['user'])<4 || strlen($input['user'])>20) {Simply remove the space after the w so it's like this:
Code: [Select]
if (!preg_match('/^[a-z0-9]+(?:[\w\-]*[a-z0-9]+)*$/',$input['user']) || strlen($input['user'])<4 || strlen($input['user'])>20) {

Do the same in the js/general.js file on about line #161 and replace this:
Code: [Select]
patn=/^[a-z0-9]+(?:[\w \-]*[a-z0-9]+)*$/;with this:
Code: [Select]
patn=/^[a-z0-9]+(?:[\w\-]*[a-z0-9]+)*$/;

Fusion Responsive Template & Free Mods
http://www.maverickwebworks.com
DO NOT PM me asking for personal help. Post your problem or request in the forums so the entire community can contribute and benefit.