mtcarpenter Posted June 23, 2004 Posted June 23, 2004 Or atleast until they themselves clear cookies.... When I login, i'm only logged in while I'm there on the site, once I close IE and go back to the site I have to login again, I'm sure my customers would get annoyed at having to login time and time again...
Paycheck Posted June 23, 2004 Posted June 23, 2004 Check your IE settings to see if you have the setting to clear your cookies on shut down. Always remember, we need patience, guidance and most of all understanding. My Contributions
Guest Posted June 23, 2004 Posted June 23, 2004 there is a auto login modules that can be installed...you can find it in the contributions section of this forum... top right corner link... Mike
mtcarpenter Posted June 23, 2004 Author Posted June 23, 2004 ################################################### Chaveiro at catus dot net # 11-05-2004 ################################################## ### ## Autologin Secure 2.01 # What this does is to alow client to set a checkbox and will be remembered in that pc for up to 14 days of inactivity. The information is saved client side in a cookie with an md5 hash from the username, encripted password, userid and current user ip. This hash warants an highly security metode even if someone steals your cookie hash as he will have to use a connection from the same ip address as you did. If client changes email or password on other computer will have to login again on other computer he might use. Module folows oscommerce codding style and use tep functions when available. DO THE FOLOWING MODS : ################################################################################ #################### MYSQL Add ################################################################################ #################### INSERT INTO configuration VALUES ('','Allow AutoLogon Cookie','ALLOW_AUTOLOGON','true','Allow registered users to save their login-info into a cookie so they are automatically logged in upon return to the shop.',15,0,'2004-05-11 18:14:50','2004-05-11 15:11:31',NULL,'tep_cfg_select_option(array(\'true\', \'false\'),'); ################################################################################ #################### Copy autologin.php to /includes/functions ################################################################################ #################### ################################################################################ #################### includes/application_top.php Modification ################################################################################ #################### define('WARN_SESSION_AUTO_START', 'true'); define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true'); // #CHAVEIRO14# Autologon require('includes/functions/autologin.php'); if ($session_started == true) { if (ALLOW_AUTOLOGON == 'true') { // Is Autologon enabled? if (basename($PHP_SELF) != FILENAME_LOGIN) { // yes if (!tep_session_is_registered('customer_id')) { tep_doautologin(); } } } else { tep_autologincookie(false); } } // #CHAVEIRO14# Autologon END ?> ################################################################################ #################### includes/languages/english.php Modification ################################################################################ #################### // #CHAVEIRO14# Autologon define('ENTRY_REMEMBER_ME','Remember me'); // #CHAVEIRO14# Autologon END ################################################################################ #################### account_edit.php Modification ################################################################################ #################### tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array, 'update', "customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$customer_default_address_id . "'"); // #CHAVEIRO14# Autologon tep_autologincookie(true); // #CHAVEIRO14# Autologon END // reset the session variables $customer_first_name = $firstname; $messageStack->add_session('account', SUCCESS_ACCOUNT_UPDATED, 'success'); ################################################################################ #################### account_password.php Modification ################################################################################ #################### tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now() where customers_info_id = '" . (int)$customer_id . "'"); // #CHAVEIRO14# Autologon tep_autologincookie(true); // #CHAVEIRO14# Autologon END $messageStack->add_session('account', SUCCESS_PASSWORD_UPDATED, 'success'); tep_redirect(tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); } else { ################################################################################ #################### login.php Modification ################################################################################ #################### 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'); // #CHAVEIRO14# Autologon if ((ALLOW_AUTOLOGONLOGON == 'false') || ($HTTP_POST_VARS['remember_me'] == '')) { tep_autologincookie(false); } else { tep_autologincookie(true); } // #CHAVEIRO14# Autologon END 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 . "'"); ################################################################################ #################### login.php Modification 2 ################################################################################ #################### <tr> <td class="main"><b><?php echo ENTRY_PASSWORD; ?></b></td> <td class="main"><?php echo tep_draw_password_field('password'); ?></td> </tr> <?php // #CHAVEIRO14# Autologon if ( (ALLOW_AUTOLOGON == 'true') && ((isset($HTTP_COOKIE_VARS['cookie_test']) && (SESSION_FORCE_COOKIE_USE == 'True')) || (SESSION_FORCE_COOKIE_USE != 'True')) ) { ?> <tr> <td> </td> <td align="left" class="smalltext"><?php echo tep_draw_checkbox_field('remember_me','on', (($password == '') ? false : true)) . ' ' . ENTRY_REMEMBER_ME; ?></td> </tr> <?php } // #CHAVEIRO14# Autologon END ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> ################################################################################ #################### logoff.php Modification ################################################################################ #################### require('includes/application_top.php'); // #CHAVEIRO14# Autologon tep_autologincookie(false); // #CHAVEIRO14# Autologon END require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGOFF); $breadcrumb->add(NAVBAR_TITLE); where do i go to make the "mysql" add...I'm not familiar with mysql and i wouldn't wanna mess something up
markchiu Posted June 23, 2004 Posted June 23, 2004 You need to use phpmyadmin or other related softwares to do it..usually i think your hosting should have got one for you ;) ....try looking around it....and check out the software, it will be very useful for any contributions.. :) but remember always backup your mysql before installing any new contributions ;) OS-commerce is great, but with other magical contributions, that is just so "COOL"!
Guest Posted August 17, 2004 Posted August 17, 2004 Is there a possibility to add the same remember me checkbox into the login box. I tried to add the same code included for login.php, but got a warning about unexpected T_STRING ? :angry: Any ideas anyone ? Tnx G
Recommended Posts
Archived
This topic is now archived and is closed to further replies.