diff --git a/files/class.user.php b/files/class.user.php index 980348c..227f1fc 100644 --- a/files/class.user.php +++ b/files/class.user.php @@ -565,7 +565,7 @@ private function regenerateRememberToken() { $this->regenerateRememberToken(); } - setcookie('autologin', $token, time()+60*60*24*7, '/', 'hackthis.co.uk', true, true); + setcookie('autologin', $token, time()+60*60*24*7, '/', $this->app->config('domain'), true, true); } public function register($username=null, $password=null, $email=null) { @@ -676,7 +676,7 @@ public function logout() { $existing = $_COOKIE['autologin']; $st = $this->app->db->prepare('DELETE FROM users_data WHERE user_id = :uid AND type = "autologin" AND value = :value LIMIT 1'); $result = $st->execute(array(':uid' => $uid, ':value' => $existing)); - setcookie('autologin', '', time()-1000, '/', 'hackthis.co.uk', true, true); + setcookie('autologin', '', time()-1000, '/', $this->app->config('domain'), true, true); } // Redirect user back to index page