31
Albright
Re: Allow Spaces in Username Hack (easy!)
  • 2004/5/7 3:26

  • Albright

  • Just popping in

  • Posts: 7

  • Since: 2004/4/25


For those of you who haven't looked at the hack ( ), it trims duplicate spaces from usernames, as well as spaces from before or after the username.

Legal:
"Garrett [space] Albright"

Illegal:
"Garrett [space] [space] Albright"
"[space] Garrett [space] Albright"
"Garrett [space] Albright [space]"

The hack will (effectively but inelegantly) transform all of those illegal names to "Garrett [space] Albright", and an error will be produced if that's already registered.

As for disallowing people to register with, say, "Garrett [space] Alb [space] right" if "Garrett [space] Albright" is already registered... I don't think that's too much of an issue, because a space like that will be more visible. That, and to implement it most effectively, we'd probably have to add a new field to Xoops' user database; the username with spaces stripped. That way, XOOPS would strip the spaces from the username someone tries to register with, check it against the username with spaces stripped fields in the DB, then pop up an error if it comes up with a match. I'm fairly certain other CMS/forum scripts don't bother with this, and, as I've said before, I don't think it's that necessary.

As_for_preferring_underscores... I'm_sorry,_but_I_just_hate_them,_for_reasons_that_should_be_quite_obvious. CamelCaseCanDieTooPlease.

32
siweb
Re: Allow Spaces in Username Hack (easy!)
  • 2004/8/5 6:32

  • siweb

  • Not too shy to talk

  • Posts: 150

  • Since: 2004/5/2 1


Did somebody posted this hack to Future requests or Patches. I haven't got any problems while using this hack for more than two months.

33
nyb50
Re: Allow Spaces in Username Hack (easy!)
  • 2005/7/28 23:58

  • nyb50

  • Just popping in

  • Posts: 12

  • Since: 2005/6/28


Can someone modify this hack to work on XOOPS 2.2?

34
ahkileez
Re: Allow Spaces in Username Hack (easy!)
  • 2005/9/20 22:06

  • ahkileez

  • Just popping in

  • Posts: 34

  • Since: 2005/7/12


I'm trying to use this very nice hack. Which would be good for me as some of my users would like to have spaces in their names instead of the less sightly underscore.

I tried this hack but have a problem. The php page won't display. I get this...

Parse error: parse error, unexpected '<' in /home/pttfulij/public_html/omni/hq/register.php on line 75

Could someone tell me how to fix this? I'm pretty sure I followed the instructions properly.

35
zANavAShi
Re: Allow Spaces in Username Hack (easy!)
  • 2006/1/6 6:35

  • zANavAShi

  • Just popping in

  • Posts: 28

  • Since: 2005/5/6 5


Quote:

nyb50 wrote:
Can someone modify this hack to work on XOOPS 2.2?


I echo that request!

36
irmtfan
Re: Allow Spaces in Username Hack (easy!)
  • 2006/1/6 7:36

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7



37
zANavAShi
Re: Allow Spaces in Username Hack (easy!)
  • 2006/1/6 9:21

  • zANavAShi

  • Just popping in

  • Posts: 28

  • Since: 2005/5/6 5


Ooooh no I hadn't seen this (didn't turn up in any of my site searches for some bizarre reason) so thanks for the headsup!


Login

Who's Online

398 user(s) are online (328 user(s) are browsing Support Forums)


Members: 0


Guests: 398


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