Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Registration : UserName validation with a regexp

 
Migrated From Jforum.net
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