• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Registration : UserName validation with a regexp

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm trying to force new users to respect a naming convention in their usernames.

After some look in the code, it seems that jforum don't make any verifications on the username field.

Is it possible to activate it by a parameter, or may i modify the code ?
I plan to test the username with a server-side regexp match.

Thank you by advance,

Edlefou.

[originally posted on jforum.net by edlefou]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A no-code change way (but not too secure) to do this would be add in some Javascript validation to the user registration template that would check the supplied user name.

Of course, a hacker could get around this fairly easily, so the more secure way would be to modify the UserAction.insertSave() method to do your checks.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thank you for these usefull informations, i have modified the UserAction.insertSave() method.

Edlefou
[originally posted on jforum.net by edlefou]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!