kopia lustrzana https://github.com/magicbug/Cloudlog
improved encryption
rodzic
6aadfbf74a
commit
f60e909459
|
@ -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',
|
||||
|
|
Ładowanie…
Reference in New Issue