Skip to content

Commit

Permalink
fix: issue with setting “fuelified” cookie with CI 3.1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
daylightstudio committed Jul 30, 2022
1 parent 31263c0 commit 56d0bdd
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions fuel/modules/fuel/controllers/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,9 @@ public function index()
{
// reset failed login attempts
$user_data['failed_login_timer'] = 0;
// set the cookie for viewing the live site with added FUEL capabilities
$config = array(
'name' => $this->fuel->auth->get_fuel_trigger_cookie_name(),
'value' => serialize(array('id' => $this->fuel->auth->user_data('id'), 'language' => $this->fuel->auth->user_data('language'))),
'expire' => 0,
//'path' => WEB_PATH
'path' => $this->fuel->config('fuel_cookie_path')
);

set_cookie($config);

// Problems using CI set_cookie helper in CI 3.1.13 so resorted to native PHP.
setcookie($this->fuel->auth->get_fuel_trigger_cookie_name(), serialize(array('id' => $this->fuel->auth->user_data('id'), 'language' => $this->fuel->auth->user_data('language'))), 0, $this->fuel->config('fuel_cookie_path'));

$forward = $this->input->post('forward');
$forward_uri = uri_safe_decode($forward);
Expand Down

0 comments on commit 56d0bdd

Please sign in to comment.