From f60e909459b34c5430ba1a315436499e069bfa7a Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 1 May 2024 21:57:25 +0100 Subject: [PATCH] improved encryption --- application/controllers/User.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controllers/User.php b/application/controllers/User.php index 1512eaee..75bb78de 100644 --- a/application/controllers/User.php +++ b/application/controllers/User.php @@ -877,7 +877,7 @@ class User extends CI_Controller { function login() { // Check our version and run any migrations $this->load->library('Migration'); - $this->load->library('encrypt'); + $this->load->library('encryption'); $this->migration->current(); @@ -894,7 +894,7 @@ class User extends CI_Controller { // Read the cookie remeber_me and log the user in if($this->input->cookie(config_item('cookie_prefix').'remember_me')) { $encrypted_string = $this->input->cookie(config_item('cookie_prefix').'remember_me'); - $decrypted_string = $this->encrypt->decode($encrypted_string); + $decrypted_string = $this->encryption->decrypt($encrypted_string); $this->user_model->update_session($decrypted_string); $this->user_model->set_last_login($decrypted_string); @@ -926,7 +926,7 @@ class User extends CI_Controller { // Create a remember me cookie if($this->input->post('remember_me') == '1') { - $encrypted_string = $this->encrypt->encode($data['user']->user_id); + $encrypted_string = $this->encryption->encrypt($data['user']->user_id); $cookie= array( 'name' => 'remember_me',