Hello,
I want to use the email as the username in a sing up process, however, some emails are larger that 20 characters. Does anybody know where I can make that maximun of 20 characters longer?
Thanks in advance,
Wilfredo
How to change the max of 20 characters for the username
Re: How to change the max of 20 characters for the username
Maybe increase max varchar value with my php admin.
Its currently set at 20
(always back up your site before making changes)
Pat
Its currently set at 20
(always back up your site before making changes)
Pat
23.17
Re: How to change the max of 20 characters for the username
It did not work!!
Re: How to change the max of 20 characters for the username
What version of AppGini are you using?
Also I just tested with my testing database running 5.31 and it worked fine.
I changed the value of memberID in the membership_users table to 30, 40, 50, 60, 70 and they all worked fine with a username which was 1 character less than the max allowed. I made the type varchar size from 30 to 70 and all was fine.
[img] [/img]
You can see in the picture a screen shot from phpmyadmin where memberID is set to 40.
Hope this helps.
Alan
Also I just tested with my testing database running 5.31 and it worked fine.
I changed the value of memberID in the membership_users table to 30, 40, 50, 60, 70 and they all worked fine with a username which was 1 character less than the max allowed. I made the type varchar size from 30 to 70 and all was fine.
[img] [/img]
You can see in the picture a screen shot from phpmyadmin where memberID is set to 40.
Hope this helps.
Alan
Calgary, Alberta, Canada - Using Appgini 5.50 -
Re: How to change the max of 20 characters for the username
Hello Shasta,
I am using Appgini 5.40.
I did that whith php my admini, as Pat suggested, however when I tried the program, the warning message appeared after entering the 20 characters long username(email). Maybe it was just the warning, I actually did not try the sign up process completly, because of the warning. I will try again, and then I just have to get rid of that warning!!
In case it works, Do you know where I can change that warning?
Thanks again,
I am using Appgini 5.40.
I did that whith php my admini, as Pat suggested, however when I tried the program, the warning message appeared after entering the 20 characters long username(email). Maybe it was just the warning, I actually did not try the sign up process completly, because of the warning. I will try again, and then I just have to get rid of that warning!!
In case it works, Do you know where I can change that warning?
Thanks again,
Re: How to change the max of 20 characters for the username
The alert looks to be this section of code, found at line 26 in admin/pageEditMember.php (V5.40)
Other Username functions/validation seem to be in "function setupMembership(){" found in admin/incFunctions.php although I haven't fiddled around in there so I don't know what sort of damage you can do editing those values?
Code: Select all
// new member or old?
if(!$oldMemberID){ // new member
// make sure member name is unique
$memberID = is_allowed_username($_POST['memberID']);
if(!$memberID){
echo "<div class=\"alert alert-danger\">Error: Username already exists or is invalid. Make sure you provide a username containing 4 to 20 valid characters.</div>";
include("$currDir/incFooter.php");
}
Re: How to change the max of 20 characters for the username
Ah, that line does not seem to exist in 5.31. Must be a new feature to check the length. Easy enough to figure out how to change that when I get on 5.4x (Or at least I could not find that line)
Not upgrading for a while because I wait to see what issues occur and what I have to watch for.
Alan
Not upgrading for a while because I wait to see what issues occur and what I have to watch for.
Alan
Calgary, Alberta, Canada - Using Appgini 5.50 -
Re: How to change the max of 20 characters for the username
As of AppGini 5.40, all username validation is centralized in admin/incFunctions.php, in the is_allowed_username() function ... To allow a username to exceed 20 characters, besides changing the length of the field in the database, you need to change the code {3,19} inside the is_allowed_username() function to {3,39} (for 40 characters max username length).
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: How to change the max of 20 characters for the username
Thanks to eveyone collaborating.
To close this topic, there is just a final change to make. In the file defaultLang.php, change the number of the maximum characters (arround line 276), for your new maximum, in this case 40. I changed that also in the file pageEditMember.php (lines 30 and 48), but it did not work. Just remember, this is for V5.40
Wilfredo
To close this topic, there is just a final change to make. In the file defaultLang.php, change the number of the maximum characters (arround line 276), for your new maximum, in this case 40. I changed that also in the file pageEditMember.php (lines 30 and 48), but it did not work. Just remember, this is for V5.40
Wilfredo
-
- Posts: 5
- Joined: 2015-07-22 07:29
Re: How to change the max of 20 characters for the username
Most of the email username ask Maximum 20 Characters, now a days it is set. Less characters always good and didn't forget the characters.
Max length / Allow email addresses as memberID
Hi Ahmad,
I know this is an old post, but I'm also struggling with this. I have seen that there is still the limit of 20 characters in admin\incFunctions.php in AppGini ver 5.72 rev. 1036 which I am using.
From my point of view this should definately be increased in the future to allow email-addresses as memberID.
Kind Regards,
Jan
I know this is an old post, but I'm also struggling with this. I have seen that there is still the limit of 20 characters in admin\incFunctions.php in AppGini ver 5.72 rev. 1036 which I am using.
From my point of view this should definately be increased in the future to allow email-addresses as memberID.
Kind Regards,
Jan
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: How to change the max of 20 characters for the username
There is a related discussion where I replied here: https://forums.appgini.com/phpbb/viewto ... f=6&t=2784
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.