Username longer than 25 characters...? Username longer than 25 characters...?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Username longer than 25 characters...?

Started by iason, November 26, 2015, 12:03:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iason

Hello Coppermine users,

having installed the latest Coppermine Gallery, during testing, i am realizing an issue that i consider to be important. A user may not have a name with a length greater than 25 characters.
Not being good on the code, i tried to address the issue, searching this forum, and beyond, for a solution.
So:
-in the database, phpmyadmin, in the table '_users', i set the username field to varchar(255)
-and in "usermgr.php", line 729, i change the 'input' to accept 255 characters
and after these two changes, logged in as administrator, i can create/edit a user with a long name.

OK. But a user's name is shown in other pages and places inside the gallery. I do not know ALL the files that must be edited.

I need a way to fix the issue, please.
I probably need a detailed list of all the references in the code that make a user's name appear, so i can edit them.
It is probably some work, but sorry, it is not my fault. I am amazed that this simple thing has been overlooked, it was a matter of making a good choice from the beginning.

Thanks you in advance,
iason

BTW: I think one more field "Name" should be there, "Username" being another.  ;)

gmc

Quote from: iason on November 26, 2015, 12:03:03 PM
I probably need a detailed list of all the references in the code that make a user's name appear, so i can edit them.
I'd suggest a tool like TextCrawler to search the code... There are 575 references in 76 files to user_name in 1.5.40...
That said, I expect most to not care about the length - only the database and form input should care (of course an excessively long username may caused interesting displays when output...)

Quote
BTW: I think one more field "Name" should be there, "Username" being another.  ;)
I'd suggest reading the docs - where you will see you have 6 fields available for your custom use in the user table/profile.  5 are defined as varchar(255) and one as text. http://documentation.coppermine-gallery.net/en/configuration.htm#admin_custom

QuoteIt is probably some work, but sorry, it is not my fault. I am amazed that this simple thing has been overlooked, it was a matter of making a good choice from the beginning.
Perhaps you might want to nicely open a feature request rather than criticize those that have written CPG that didn't have the foresight to think you might want to have your users type a 255 character username to get access to your site... ;)
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

iason

Thank you for your suggestions. The documentation is something one must really dive in.

I see now that i can go with an extra custom field for the real name, but IMHO the two fields for username and name should be clearly distinguished by default, and at the same time giving the user the ability to use just one.

Yes i also think that 255 in not practical of course, however 25 for a name is probably short for someone that does not want to use both real name and username.

Thank you, be happy.  :)