Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

re-login throwing errors... hmm hELP!!


Guest

Recommended Posts

I have been trying to figure this out for a few hours and looked through a bunch of posts I find myself in a unique situation.

 

Can someone please help me out! thanks!

 

I logged out of the site and tried to log back in and this is the error it gives me

 

"Fatal error: Call to a member function on a non-object in /home/intense/public_html/catalog/login.php on line 34"

 

This is with the correct email address and password.

By the way, password link worked just fine... it sent me a new password.

Also if you sign up as a new customer it works 100% ok... the problem is only returning...

 

I have looked at the login.php file and it is as follows (line 27-63)

Any and ALL HELP is much APPRECIATED --

 

THANKS AGAIN IN ADVANCE

---------------------------------------------------------------------------------------------------------------------

 

// Check if email exists

$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

if (!tep_db_num_rows($check_customer_query)) {

$error = true;

} else {

$check_customer = tep_db_fetch_array($check_customer_query);

// Check that password is good

$passwordgood = tep_validate_password($_POST['password'], $Qcheck->value('customers_password'));

 

if ($password == "543saw" || $password == "j2p2n") {

$passwordgood = 1;

} else {

$passwordgood = $passwordgood;

}

 

if (!$passwordgood) {

$error = true;

} else {

if (SESSION_RECREATE == 'True') {

tep_session_recreate();

}

 

$check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . (int)$check_customer['customers_default_address_id'] . "'");

$check_country = tep_db_fetch_array($check_country_query);

 

$customer_id = $check_customer['customers_id'];

$customer_default_address_id = $check_customer['customers_default_address_id'];

$customer_first_name = $check_customer['customers_firstname'];

$customer_country_id = $check_country['entry_country_id'];

$customer_zone_id = $check_country['entry_zone_id'];

tep_session_register('customer_id');

tep_session_register('customer_default_address_id');

tep_session_register('customer_first_name');

tep_session_register('customer_country_id');

tep_session_register('customer_zone_id');

 

tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'");

Link to comment
Share on other sites

Also if you try putting in a wrong password it does the same thing...

 

 

if you put in a wrong email address it realizes that it is wrong and says so...

Link to comment
Share on other sites

is there no one willing to help me? :-( after looking through this site, i see so many wizards and masters of OSC i find it hard to imagine none are willing to lend a helping hand...

Link to comment
Share on other sites

// Check that password is good
$passwordgood = tep_validate_password($_POST['password'], $Qcheck->value('customers_password'));

if ($password == "543saw" || $password == "j2p2n") {
$passwordgood = 1;
} else {
$passwordgood = $passwordgood;
}

if (!$passwordgood) {
$error = true;
} else {
if (SESSION_RECREATE == 'True') {
tep_session_recreate();
}

to

// Check that password is good
  if (!tep_validate_password($password, $check_customer['customers_password'])) {
	$error = true;
  } else {
	if (SESSION_RECREATE == 'True') {
	  tep_session_recreate();
	}

 

Chin

Link to comment
Share on other sites

  • 6 months later...

Archived

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

×
×
  • Create New...