1
xsell
Register New Name with space?
  • 2008/9/28 4:09

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Hello

How do you Sign up new Name with Space between parts , like " johny Sparks" , i could do it with 2.18.2 by commit some codes on register.php file , but i dont know how to do it with XOOPS 2.30

XOOPS - XOOPS 2.3.0
PHP - 5.2.3
MySQL - 5.0.67
Server API - apache2handler

2
ghia
Re: Register New Name with space?
  • 2008/9/28 18:32

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Try with change of
switch ($xoopsConfigUser['uname_test_level']) {
        case 
0:
            
// strict
            
$restriction '/[^a-zA-Z0-9_-]/';
            break;
        case 
1:
            
// medium
            
$restriction '/[^a-zA-Z0-9_-<>,.$%#@!\'"]/';
            break;
        case 2:
            // loose
            
$restriction = '/[00-40]/';
            break;
        }

in /class/userutility.php to
switch ($xoopsConfigUser['uname_test_level']) {
        case 
0:
            
// strict
            
$restriction '/[^a-zA-Z0-9 _-]/';
            break;
        case 
1:
            
// medium
            
$restriction '/[^a-zA-Z0-9 _-<>,.$%#@!\'"]/';
            break;
        case 2:
            // loose
            
$restriction = '/[00-3133-40]/';
            break;
        }
.

Edit: Are there some blocks in the code window or is it me?
Anyway the modifs are: add a space after 0-9 (two occurences) and modify the third restriction to \000-\031\033-\040

3
xsell
Re: Register New Name with space?
  • 2008/9/29 23:14

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Thx ..

I could not read your Code , but i follow your Direction , and it did work ..with Select the level of strictness for username filtering : set to Strict but i use the third Choice .Light ( Recommended For multi byts Chars . which allow me use foreign Letter not only English letter ..

How to get it to work when i set it to light level of strictness ..

4
ghia
Re: Register New Name with space?
  • 2008/9/30 9:36

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I try to post again:
Quote:

switch ($xoopsConfigUser['uname_test_level']) {
case 0:
// strict
$restriction = '/[^a-zA-Z0-9 \_\-]/';
break;
case 1:
// medium
$restriction = '/[^a-zA-Z0-9 \_\-\<\>\,\.\$\%\#\@\!\\\'\"]/';
break;
case 2:
// loose
$restriction = '/[\000-\037]/';
break;
}

I don't know why the code window behaves in such a strange way (a XOOPS 2.3.0 problem?).

5
xsell
Re: Register New Name with space?
  • 2008/9/30 10:49

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Yes that How i edited too but like i Said this well Work if from Control Panel : System >>Preferences »» User Info Settings
then Down to : Select the level of strictness for username filtering ..

if i Set it to 'stric ' that edited way well work .. but if i set it to ' light' it well not work ..

and i have it setted for 'Light' to allow other Character to be registered with space in thier user name ,since most of my users use none English letters .

6
ghia
Re: Register New Name with space?
  • 2008/9/30 12:48

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Sorry, my mistake!
The code values seems to be octal in stead of the assumed decimal.
So it is /[\000-\037]/ and not /[\000-\031\033-\040]/.
I corrected it in my earlier post also.
Beware that it allows also other punctuation like ():; etc., but that's also the case with the unmodified source.

7
xsell
Re: Register New Name with space?
  • 2008/9/30 22:09

  • xsell

  • Quite a regular

  • Posts: 245

  • Since: 2008/9/2 1


Perfect !! Many Thx

8
Anonymous
Re: Register New Name with space?
  • 2008/12/11 13:47

  • Anonymous

  • Posts: 0

  • Since:


Thanks ghia

9
Kiwi_Chris
Re: Register New Name with space?
  • 2009/5/16 8:05

  • Kiwi_Chris

  • Just popping in

  • Posts: 79

  • Since: 2009/1/3 2


Brilliant, are you planning to correct this in the next release?

Login

Who's Online

78 user(s) are online (55 user(s) are browsing Support Forums)


Members: 0


Guests: 78


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits