Hi there,

Please consider registering for an account. Registration is free, only takes a minute and will allow you to access members only boards. If you already have an account with us, then click here to log in.

collapse

* Who's Online

  • Dot Guests: 30
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.


Author Topic: Add more characters to those not allowed in usernames  (Read 4188 times)

0 Members and 2 Guests are viewing this topic.

WestwegoManTopic starter

  • Administrator
  • Pirogue Pusher
  • *****
  • Posts: 46
  • Age: 50
  • Location: Westwego, La.
    • View Profile
Add more characters to those not allowed in usernames.

This exact edit will make it where only numbers and letters and spaces are allowed.

in ./Sources/Subs-Members.php

Find:
Code: [Select]
// Only these characters are permitted.
if (preg_match('~[<>&"\'=\\\\]~', preg_replace('~&#(?:\\d{1,7}|x[0-9a-fA-F]{1,6});~', '', $regOptions['username'])) != 0 || $regOptions['username'] == '_' || $regOptions['username'] == '|' || strpos($regOptions['username'], '[code') !== false || strpos($regOptions['username'], '[/code') !== false)
$reg_errors[] = array('lang', 'error_invalid_characters_username');

Replace with:
Code: [Select]
// Only these characters are permitted.
if (preg_match('~^[a-zA-Z0-9 ]{1,}$~', $regOptions['username']) == 0 || $regOptions['username'] == '_' || $regOptions['username'] == '|' || strpos($regOptions['username'], '[code') !== false || strpos($regOptions['username'], '[/code') !== false)
$reg_errors[] = array('lang', 'error_invalid_characters_username');


 


The postings on this site are my own and do not necessarily reflect the views of Jefferson Parish,

fellow employees, members of the public, suppliers or people working on behalf of the parish.


SimplePortal 2.3.6 © 2008-2014, SimplePortal