Junior Spellweaver
- Joined
- Jan 22, 2012
- Messages
- 197
- Reaction score
- 42
Ok guys so I asked for an answer to this and didn't get it bit I found it myself and figured it out. So if you want to change the length of allowed emails and account names do as follows bare with me as this is my first tutorial.
If your using 343's release go to /opt/lampp/htdocs/register get the index file there index.php MAKE A BACK UP OF THE FILE BEFORE PROCEEDING I would suggest making a folder and labeling it backup files and putting a copy of the unedited file in it.
Then open it in your text editor of choice.. for noobies id use wordpad since it keeps the formatting better and find the following.
For some of you I am sure this becomes painfully obvious as to what to change looking at it but for those who don't have as much experience these numbers effect the allowed lengths < 4) > 10 four being the minimum number and 10 being the high except for in the emails which are 4-25 characters.
Also be sure to edit these three messages
echo "User Name must have more than 4 and not more than 10 characters.";
echo "Password must have more than 4 and not more than 10 characters.";
}
echo "Email Address must have more than 4 and not more than 25 characters."; so they show the new values they entered for those of you who need an example I included my edited lines below.
Ok so this is how you edit it in the admin account registration page since it uses a different file than the main registration.
go here /opt/apache-tomcat-5.5.28/2/webapps/pwAdmin
get the account.jsp file again MAKE A BACK UP BEFORE GOING FORWARD
then find this line
directly below it you will see an entry with numbers just like the first tutorial just change them to match your new settings and your good again here is my own edit as an example.
Additionally could a mod please change the title of this thread so it reads registration EMAILS and user names I kind of goofed on that.
If your using 343's release go to /opt/lampp/htdocs/register get the index file there index.php MAKE A BACK UP OF THE FILE BEFORE PROCEEDING I would suggest making a folder and labeling it backup files and putting a copy of the unedited file in it.
Then open it in your text editor of choice.. for noobies id use wordpad since it keeps the formatting better and find the following.
Code:
if (MySQL_Num_Rows($Result))
{
echo "Account <b>".$Login."</b> already exists";
}
elseif ((StrLen($Login) < 4) or (StrLen($Login) > 10))
{
echo "User Name must have more than 4 and not more than 10 characters.";
}
elseif ((StrLen($Pass) < 4) or (StrLen($Pass) > 10))
{
echo "Password must have more than 4 and not more than 10 characters.";
}
elseif ((StrLen($Repass) < 4) or (StrLen($Repass) > 10))
{
echo "Confirmation password error.";
}
elseif ((StrLen($Email) < 4) or (StrLen($Email) > 25))
{
echo "Email Address must have more than 4 and not more than 25 characters.";
}
For some of you I am sure this becomes painfully obvious as to what to change looking at it but for those who don't have as much experience these numbers effect the allowed lengths < 4) > 10 four being the minimum number and 10 being the high except for in the emails which are 4-25 characters.
Also be sure to edit these three messages
echo "User Name must have more than 4 and not more than 10 characters.";
echo "Password must have more than 4 and not more than 10 characters.";
}
echo "Email Address must have more than 4 and not more than 25 characters."; so they show the new values they entered for those of you who need an example I included my edited lines below.
Code:
if (MySQL_Num_Rows($Result))
{
echo "Account <b>".$Login."</b> already exists";
}
elseif ((StrLen($Login) < 4) or (StrLen($Login) > 16))
{
echo "User Name must have more than 4 and not more than 16 characters.";
}
elseif ((StrLen($Pass) < 4) or (StrLen($Pass) > 30))
{
echo "Password must have more than 4 and not more than 30 characters.";
}
elseif ((StrLen($Repass) < 4) or (StrLen($Repass) > 30))
{
echo "Confirmation password error.";
}
elseif ((StrLen($Email) < 4) or (StrLen($Email) > 60))
{
echo "Email Address must have more than 4 and not more than 60 characters.";
}
elseif ($Pass != $Repass)
{
echo "Confirmation password error.";
}
else
{
Ok so this is how you edit it in the admin account registration page since it uses a different file than the main registration.
go here /opt/apache-tomcat-5.5.28/2/webapps/pwAdmin
get the account.jsp file again MAKE A BACK UP BEFORE GOING FORWARD
then find this line
Code:
if(login.length() > 0 && password.length() > 0)
directly below it you will see an entry with numbers just like the first tutorial just change them to match your new settings and your good again here is my own edit as an example.
Code:
if(login.length() > 0 && password.length() > 0)
{
if(login.length() < 4 || login.length() > 16 || password.length() < 4 || password.length() > 30)
{
Additionally could a mod please change the title of this thread so it reads registration EMAILS and user names I kind of goofed on that.
Last edited: