Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change Admin Passwords osCommerce


scrap4less

Recommended Posts

Posted

Yours is version prior to RC1.

 

As oscommerce admin folder was password protected prior to this and now its thru Db fileds that it is protected.

 

If oscommerce 2.2 the just go thru cpanel password protect directory and chage else You need to did into DB thru PhpMyadmin and remove present entries.

 

Once code finds no entry for admin will allow some entry to be made.

 

look into this code part to get some idea.

 

case 'create':

$check_query = tep_db_query("select id from " . TABLE_ADMINISTRATORS . " limit 1");

 

if (tep_db_num_rows($check_query) == 0) {

$username = tep_db_prepare_input($HTTP_POST_VARS['username']);

$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

 

tep_db_query('insert into ' . TABLE_ADMINISTRATORS . ' (user_name, user_password) values ("' . $username . '", "' . tep_encrypt_password($password) . '")');

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted

$admins_check_query = tep_db_query("select id from " . TABLE_ADMINISTRATORS . " limit 1");

if (tep_db_num_rows($admins_check_query) < 1) {

$messageStack->add(TEXT_CREATE_FIRST_ADMINISTRATOR, 'warning');

}

 

also this code tells that if no entry then it allows to add one.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Archived

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

×
×
  • Create New...