Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Autologon 1.03 no longer working?


Daibheid

Recommended Posts

Posted

Anyone have an autologon contribution that'll remember passwords and such. I've upgrated to the 5/18 snapshot and Autologon 1.03 doesn't work for some reason.

 

 

D.

  • Replies 50
  • Created
  • Last Reply
Posted

OK. Part of this was typo error on my part. Here's what happens now...

 

When I go to log into the site and click "remember me" I get:

 

Fatal error: Call to undefined function: tep_validate_password() in /****/login.php on line 31

 

D.

Posted
CVS version is using a new session management system that was added after MS1 ... that should explain your problem

PS:

login.php

account_password.php

password_funcs.php

still use/provide tep_validate_password() ... so i suppose the problem is with session or cookiesystem (which was changed in CVS too)

Posted

Change your *catalog*/includes/functions/password_funcs.php file to:

<?php 

 function tep_validate_password($plain, $encrypted) { 

 

   global $HTTP_COOKIE_VARS; 

   

   if (tep_not_null($plain) && tep_not_null($encrypted)) { 



// split apart the hash / salt 

     $stack = explode(':', $encrypted); 



     if (sizeof($stack) != 2) return false; 



     if (md5($stack[1] . $plain) == $stack[0]) { 

       return true; 

     } 

   } 

  if (tep_not_null($HTTP_COOKIE_VARS['password']) && tep_not_null($encrypted)) {   //Autologon 

     if ($HTTP_COOKIE_VARS['password'] == $encrypted) { 

      return true; 

     }      

  } 

   return false; 

 } 



// This function makes a new password from a plaintext password. 

 function tep_encrypt_password($plain) { 

   $password = ''; 



   for ($i=0; $i<10; $i++) { 

     $password .= tep_rand(); 

   }

} 

?>

The original function was called "validate_password()" and the autologon one is called "tep_validate_password()".

 

Chemo

Posted

Also if you get an error that says there was a call to an undefined funtion: crypt_password() on line [around] 256 of *store*/create_process_process.php WHEN SOMEONE REGISTERS A NEW ACCOUNT you need to change this code:

...

<?php

 } else {

   $sql_data_array = array('customers_firstname' => $firstname,

                           'customers_lastname' => $lastname,

                           'customers_email_address' => $email_address,

                           'customers_telephone' => $telephone,

                           'customers_fax' => $fax,

                           'customers_newsletter' => $newsletter,

                           'customers_password' => crypt_password($password),

                           'customers_default_address_id' => 1);



   if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;

   if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);

...

 

to this code:

...

<?php

 } else {

   $sql_data_array = array('customers_firstname' => $firstname,

                           'customers_lastname' => $lastname,

                           'customers_email_address' => $email_address,

                           'customers_telephone' => $telephone,

                           'customers_fax' => $fax,

                           'customers_newsletter' => $newsletter,

                           'customers_password' => tep_encrypt_password($password),

                           'customers_default_address_id' => 1);



   if (ACCOUNT_GENDER == 'true') $sql_data_array['customers_gender'] = $gender;

   if (ACCOUNT_DOB == 'true') $sql_data_array['customers_dob'] = tep_date_raw($dob);

...

Notice that customer_password => *function name* has been changed.

 

Chemo

  • 8 months later...
Posted

Thank you! You will be in haven! What is your time schedule?

I think I have to look in the contributions list when you are so far isn't it?

Keesjan

Posted

This contribution works very good in my osc2.2-ms2

 

I downloaded the 11/07/2003 - Autologon 1.05 for MS2, updated by Rob Bell.

 

The problems that i found were in the readme file, i think.

 

In the readme are not included like a changed files:

catalog/account_password.php

catalog/includes/filenames.php

 

but you can find the "CHG" files to edit these file in the contribution Zip

 

and account_edit_process.php is account_edit.php

 

Another little problem was a broken link that shows a popup with Info about Automatic Signup Option. But just needed to edit a link in login.php

 

I only test the contribution in I.E. 6

 

So if anybody want my files of autologon, just tell me..

Posted

Hello @ all,

 

this is still a information for the usage of Autologo v1.06:

 

I installed it and configured it as recommended - works very well for me - :D

 

I tested it in all the ways autologon true and false for these browsers and it works fine:

 

 

Crazy Brwoser v1.0.5 using the IE Enginev6.00.2800.1400

 

 

Internet Explorer v6.0.2800.1106

 

 

Opera v6.05 Build1140

 

- Mozilla 3.0

- Mozilla 4.78

- Mozilla 5.0

- Opera

 

 

Firebird v0.6.1

 

-Mozilla/5.0

 

 

 

Plattform: Win32 System: Windows 2000

Posted

This contrib works great BUT I have run into some problems with my other contrib. It seems when autologin is set to true, my meta / header tag contrib. are having some problems. Not in the sense they are not showing but all meta tests and link check test fail. when I set auto login to false a can get valid test results back. Has anyone run into this problem, I like this contrib. but feel search engine ranking to be more important.

Posted

Hi,

 

I have Autologon 1.06 installed and tested very intensivly and have Problems with the shopping cart.

 

I logged on - checked autologin , bought the half store empty (just packed in the cart) and closed the Browser (IE 6)

 

Then I came back to the shop and on the starting page there is the shopping cart shown with all the goods inside.

 

BUT - if I the click the menu shopping cart or the icon it comes to a surorise. NOTHING in the cart anymore, everything is gone.

 

I can reproduce this as often I want - I do not have a solution and hope anybody from you outside know already this bug and has a fix.

 

I also checked the DB - everything is correctly stored in the Customers_basket.

 

After this I have tested the OLD way - just disabled Autologon and played around. Evrything is fine with this.

 

Hope to hear from you soon...

Posted

Hello

 

I like the idea behind this contrib. and have installed it and it's working fine except for a major problem - when a costumers is checking out and want to pay with credit card the costumer is automatically logged off when he hit the "online payment" button. With autologon set to false - no problems - except autologon isn't working. Any suggestions are welcome.

 

Sincerely

Cornelius

dog1.jpg Who let the dog out ?!!! Newer trust a smiling dog!
Posted

This contrib works fine for me, but i think that the "logoff" problem are in this part of code in autologon.php

 

<code>

} else {

if($autologon_executed != 'true'){

$autologon_page = '<html><head><meta http-equiv="Refresh" content="0;URL=' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '"></head><body></body></html>';

$autologon_link = ((getenv('HTTPS') == 'on') ? 'https://' : 'http://') . $SERVER . $REQUEST_URI . (strpos($REQUEST_URI, "?") ? '&' : '?') . SID;

$autologon_executed = 'true';

if(!tep_session_is_registered('autologon_link'))

tep_session_register('autologon_link');

if(!tep_session_is_registered('autologon_executed'))

tep_session_register('autologon_executed');

tep_session_close();

exit($autologon_page);

}

}

if (tep_session_is_registered('autologon_link')) {

$x = $autologon_link;

tep_session_unregister('autologon_link');

tep_redirect($x);

}

</code>

 

Maybe in $autologon_page

Posted

Hey- great thanks...

would you please also tell me where I have to put the code in (file + round about position)

 

Thanks

Kai

Posted

Mutter

 

Thanks - I've tried to // the exit($autologon_page); line and now everything is working as it should. Can you, or any other, see a problem with that. (It's a little violent against the original script)

 

 

Saletco

 

You should not put this code anywhere - It's a part of the original catalog/includes/modules/autologon.php script from this contrib.

 

Sincerely

Cornelius

dog1.jpg Who let the dog out ?!!! Newer trust a smiling dog!
Posted

Cornelius, the autologon works fine in my OSC but i will try to comment that line and see if the contribution still working.

Posted

The original Autologon 1.06 works fine when i use it in a www.domain.com URL, but when i tested autologon in a IP domain like 67.394.294.38/~thesite/ i have the "logoff" problem and the explorer show page not found.

 

So i changed this in autologon.php:

 

} else {
if($autologon_executed != 'true'){
$autologon_page = '<html><head><meta http-equiv="Refresh" content="0;URL=' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '"></head><body></body></html>';
$autologon_link = ((getenv('HTTPS') == 'on') ? 'https://' : 'http://') . $SERVER . $REQUEST_URI . (strpos($REQUEST_URI, "?") ? '&' : '?') . SID;
$autologon_executed = 'true';
if(!tep_session_is_registered('autologon_link'))
tep_session_register('autologon_link');
if(!tep_session_is_registered('autologon_executed'))
tep_session_register('autologon_executed');
tep_session_close();
exit($autologon_page);
}
}
if (tep_session_is_registered('autologon_link')) {
$x = $autologon_link;
tep_session_unregister('autologon_link');
tep_redirect($x);
}

 

 

to:

 

} else {
}
if (tep_session_is_registered('autologon_link')) {
$x = $autologon_link;
tep_session_unregister('autologon_link');
tep_redirect($x);
}

 

And seems to still working fine, but i don't know what problems can create removing that part of code, so if you have the "logoff" problem try changing this part of code and test the contribution in all the ways you can.

Posted

Mutter

 

I have looked at this again. After several days of testing on my online shop I haven't seen any problems. I think the idear with the line I have // out is to log the user out if he leave the shop and go to another URL - in fact that's precisely what happens when a costumer click the "online payment" button in my credit card module - the user are via a secure ssl tunnel redirected to my payment gateway providers url.

 

Sincerely

Cornelius

dog1.jpg Who let the dog out ?!!! Newer trust a smiling dog!
  • 3 weeks later...
Posted

Hi,

I had the same log off problem.

I have taken out the code you've recommended and it seems to work fine, except for when I log off, the current user doesn't actually log off.

 

If i clean out cookies, it brings it back to normal.

 

How can I get the log off function to actually log me off properly?

Posted

Pastizi, maybe is your cookie config in catalog/configure.php

 

I have it like this:

define('HTTP_COOKIE_PATH', '/catalog/');

  • 3 weeks later...
Posted

Guys,

 

I'm trying to figure out if Autologon is working in the way it should or not.

 

I have just installed this mod and have just tested it across a bunch of browsers and the same effect... basically what I expected Autologon to do was remember the user so next time they return to www.mysite.com they are logged in and greeted immediately with "Hello John". The reality is I still have to click on "sign-in" but the difference since installing this mod is that I don't have to fill in my email address and password as they are already there.

 

So is this the way it should work or is my implementation broken?

 

Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...