Page 2 of 2

Re: Registering via sql

Posted: Fri Dec 26, 2008 5:14 pm
by espicom
Did you, by chance, remember to increase the size of the user name box on your forms to match the length of email addresses? Your user that was inserted earlier has the address 'loiretemploi@loiretemploi.com', while the query is looking for the address 'loiretemploi@loiretemploi'... missing the .com portion of the address. These won't find each other...

'loiretemploi@loiretemploi' happens to be 25 characters long, which is the maximum length for a user name in the database, and some templates will not allow the entry of more than 25 characters in that field.

Re: Registering via sql

Posted: Sat Dec 27, 2008 6:22 pm
by vince_45
Hello !

It seems to be the answer to my issue, thank you very much !
I have modified the email address to shorter it under 25 characters and I succeded in connecting !

I am not able to modify my code right now today but think I will juste change the : size="" parameter of the username field.
Do you know the value I have to seize ? I assume it is the user_password length in the database ?
And what about the maxlength parmeter for the username field ? Why isn't it 25 as the size ? Is there a reason ?

Code: Select all

<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
  <tr>
	<th height="25" class="thHead" nowrap><font color="#FF7800">Veuillez entrer votre nom d'utilisateur et votre mot de passe pour vous connecter.</font></th>
  </tr>
  <tr>
	<td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%">
		  <tr>
			<td colspan="2" align="center">&nbsp;</td>
		  </tr>
		  <tr>
			<td width="45%" align="right"><span class="gen"><font color="#656551">Nom d'utilisateur:</font></span></td>
			<td>
			  <input type="text" class="post" name="username" size="25" maxlength="40" value="" />
			</td>
		  </tr>
Thank you very much again !

Vince

Re: Registering via sql

Posted: Sat Dec 27, 2008 8:43 pm
by espicom
The maxlen field should match the length assigned to the user_email field, allowing for any special character encodings. That means 255 characters should be allowed.

Re: Registering via sql

Posted: Mon Dec 29, 2008 10:45 am
by vince_45
Hello,

I changed the size parameter to 50 instead of 25 in the login_body.tpl file :

Code: Select all

<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
  <tr> 
	<th height="25" class="thHead" nowrap><font color="#FF7800">{L_ENTER_PASSWORD}</font></th>
  </tr>
  <tr> 
	<td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%">
		  <tr> 
			<td colspan="2" align="center">&nbsp;</td>
		  </tr>
		  <tr> 
			<td width="45%" align="right"><span class="gen"><font color="#656551">{L_USERNAME}:</font></span></td>
			<td> 
			  <input type="text" class="post" name="username" size="50" maxlength="40" value="{USERNAME}" />
			</td>
		  </tr>
		  <tr> 
But it seems that the length is limited somewhere else aslo..

See the debbug report hereunder (after setting the size at 50 of course) :

Code: Select all

'cpoligny@yahoo.fr' / 'xxxxxx' 
'SELECT user_id, user_email, user_password, user_active, user_level, user_login_tries, user_last_login_try
			FROM phpbb_users
			WHERE user_email = 'cpoligny@yahoo.fr''
Array
(
    [user_id] => 4
    [user_email] => cpoligny@yahoo.fr
    [user_password] => aade86c627bef71f7c0ea9991e5aa268
    [user_active] => 1
    [user_level] => 0
    [user_login_tries] => 0
    [user_last_login_try] => 0
)

'loiretemploi@loiretemploi' / 'xxxxxx' 
'SELECT user_id, user_email, user_password, user_active, user_level, user_login_tries, user_last_login_try
			FROM phpbb_users
			WHERE user_email = 'loiretemploi@loiretemploi''

Do you know where I have to make this modification too ?

Thank you very much,

Vince

Re: Registering via sql

Posted: Mon Dec 29, 2008 5:23 pm
by espicom
in includes/functions.php, the function phpbb_clean_username() truncates the username to 25 characters, so you'll want to expand that, too.

Re: Registering via sql

Posted: Mon Dec 29, 2008 5:39 pm
by vince_45
Just working perfectly now !

Thank you so much again for your time and "commitment" !

Vince