Gossamer Forum
Home : Products : DBMan SQL : Development, Plugins and Globals :

Regexps for system fields in the user table

Quote Reply
Regexps for system fields in the user table
Hi

I've clicked on "customize user_table_name" below the user list in the admin panel and I've realized, that I can't enter/change a regexp for the following "system" fields: Username, Password, Email, Name, Status, ReceiveMail, Newsletter. In our system, we'd like to have some regexps for those fields. I'm quite sure I can add these regexps to the appropriate def file (the one from the user_table) in the def folder.

Question to the GT developpers: wouldn't it be possible to unlock these fields so that one could enter regexps via admin panel?

Any answer/comment is highly appreciated.
Smileliver
Quote Reply
Re: [olivers] Regexps for system fields in the user table In reply to
Hello again,

I'd be really glad for an answer to this question. We need to have regexps for Username and Password.

Thanks for any help/comments!
Unsureliver
Quote Reply
Re: [olivers] Regexps for system fields in the user table In reply to
Try to check the .def files.
There you can edit manually, but backup them first as they are critical!
Regexps are stored there.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Regexps for system fields in the user table In reply to
Thanks for your fast answer!

I know that regexps are stored in the .def files. I only wonder why some "user system fields" are not editable in the admin gui so that regexps can be changed there directly. Only custom user fields are editable for the moment. I wonder if there is a special reason for this...

Maybe, there are some places in the DBMan SQL code where user system fields are being checked (e.g. Username, Password)?

By the way - do you have a suggestion for a good username regexp that allows no "number only usernames" (\D+) and requires a minimum of 8 chars and a maximum of 12 chars {8,12}. What special signs would you exclude in addition?

Your help is being appreciated very much!

All the best,
Smileliver
Quote Reply
Re: [olivers] Regexps for system fields in the user table In reply to
Quote:
I wonder if there is a special reason for this...
I don't know if there is a special reason for this. I could check the app code, but this would need several hours.

Quote:
Maybe, there are some places in the DBMan SQL code where user system fields are being checked (e.g. Username, Password)?
Yes, there are, for sure.
This would also need code check to say a sure opinion.


Quote:
allows no "number only usernames" (\D+) and requires a minimum of 8 chars and a maximum of 12 chars {8,12}. What special signs would you exclude in addition?

/[A-Za-z][A-Za-z_0-9]{7,11}/

This regexp forces to start with a letter character, following with 7-11 letter, number or underscore character.
I would allow these and nothing else as username.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Regexps for system fields in the user table In reply to
Hello again, Webmaster33,

thanks that you have taken the time to have a look at the regexp issue! It looks good and I will add this regexp to the def file on my test server. I see that you suggest to just allow underscore as special char which makes absolutely sense to me Wink.

Do you think this regexp has just an influence on the user signup/registration process for new users or do I have to rename existing users not complying to the new regexp?

As far as the app code is concerned, I fully agree that it takes some time to analyze it. First, I will wait a bit to see if GT posts an answer. In my oppinion, the help documentation should say something about Username and Password checking and it should be possible to add regexps. It's not so good to solve this with javascript and I would prefer to have this issue solved in DBMan SQL itself.

Best regards and have a good time
Smileliver
Quote Reply
Re: [olivers] Regexps for system fields in the user table In reply to
Quote:
Do you think this regexp has just an influence on the user signup/registration process for new users or do I have to rename existing users not complying to the new regexp?

Can't tell you more without analyzing the app code.


Javascript solution is definitely not good. It can be just an additional dynamic user side solution, but not the only one.
Server side check + javascript solution is good idea.


Let's wait, what GT says about the issue.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...