New Zenner
- Join Date:
- Feb 2007
- Posts:
- 38
- Plugin Contributions:
- 0
Is a Permanent Login (Auto-Login) Possible?
how could it be possible to let users "stay logged in on this computer" (auto / permanent login)?
thx
New Zenner
Totally Zenned
New Zenner
Totally Zenned
New Zenner
New Zenner
Totally Zenned
Totally Zenned
New Zenner
New Zenner
Totally Zenned
New Zenner
add a checkbox to your login-form called something like "permLogin".
New Zenner
Totally Zenned
New Zenner
Totally Zenned
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
in:
[SELECT customers_password FROM zen_customers WHERE customers_id=]if (substr_count($_COOKIE["zencart_cookie_permlogin"], "~~~") > 1) {
if (empty($_SESSION['customer_id'])) {
$c = explode("~~~", $_COOKIE["zencart_cookie_permlogin"]);
$q = "SELECT customers_password FROM " . TABLE_CUSTOMERS . " WHERE customers_id=" . $c[0];
$r = $db->Execute($q);
$pw_cookie = zen_db_prepare_input($c[7]);
$pw_zencart = $r->fields['customers_password'];
if ($pw_cookie == $pw_zencart) {
$_SESSION['customer_id'] = $c[0];
$_SESSION['customer_default_address_id'] = $c[1];
$_SESSION['customers_authorization'] = $c[2];
$_SESSION['customer_first_name'] = $c[3];
$_SESSION['customer_last_name'] = $c[4];
$_SESSION['customer_country_id'] = $c[5];
$_SESSION['customer_zone_id'] = $c[6];
$_SESSION['cart']->restore_contents();
}
}
}New Zenner
Totally Zenned
New Zenner
Totally Zenned
does all the stuff around line 70. just after this we hook in. put that code there
Destination thread ID and reason are required when shown.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.