1
nyb50
Spaces in username 2.2
  • 2005/7/28 23:05

  • nyb50

  • Just popping in

  • Posts: 12

  • Since: 2005/6/28


Can spaces be used in usernames in XOOPS 2.2? If not how can it be enabled. I know there was a hack for XOOPS 2.0.x but now the register.php has become part of a module with different structure than the old version. Any suggestion?

2
irmtfan
Re: Spaces in username 2.2
  • 2005/8/1 12:32

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


this is what i need exactly.
many users in my site have spaces in their usernames and if i upgrade to 2.2 all of them must change their own usernames

3
irmtfan
Re: Spaces in username 2.2
  • 2005/8/1 15:45

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


ok i catch it
thanks to Albright i just implement this hack to 2.2:
open modules/profile/include/functions.php
around line 26 :
switch ($xoopsModuleConfig['uname_test_level']) {
        case 
0:
        
// strict
        
$restriction '/[^a-zA-Z0-9_-[color=FF0000]s[/color]]/';
        break;
        case 
1:
        
// medium
        
$restriction '/[^a-zA-Z0-9_-<>,.$%#@!\'"[color=FF0000]s[/color]]/';
        break;
        case 2:
        // loose
        
$restriction = '/[00-40[color=FF0000]s[/color]]/';
        break;
    }


then around line 68:
[color=FF0000]//[/color]   if (strrpos($user->getVar('loginname'), ' ') > 0) {
 
[color=FF0000]//[/color]       $stop .= _PROFILE_MA_NICKNAMENOSPACES."";
 
[color=FF0000]//[/color]   }


it works for me

4
zANavAShi
Re: Spaces in username 2.2
  • 2006/1/6 9:24

  • zANavAShi

  • Just popping in

  • Posts: 28

  • Since: 2005/5/6 5


Irmtfan you are an angel!!! Thanks so much for this. I had same problem with my user database also and had to revert back to 2.0.13 so I can't wait to try this out at the weekend....

MUCHOS GRATITUDES!!!

Login

Who's Online

332 user(s) are online (252 user(s) are browsing Support Forums)


Members: 0


Guests: 332


more...

Donat-O-Meter

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

Latest GitHub Commits