mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 12:31:06 -05:00
session-library has been updated. fixes #371
https://www.codeigniter.com/user_guide/installation/upgrade_300.html
This commit is contained in:
parent
be6a8f00ee
commit
87004f63eb
@ -53,13 +53,13 @@ class Auth extends CI_Controller
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->db_session->keep_flashdata('tried_to');
|
||||
$this->session->keep_flashdata('tried_to');
|
||||
$this->login();
|
||||
}
|
||||
|
||||
function login($errorMsg = NULL)
|
||||
{
|
||||
$this->db_session->keep_flashdata('tried_to');
|
||||
$this->session->keep_flashdata('tried_to');
|
||||
|
||||
if (!$this->auth_ldap->is_authenticated())
|
||||
{
|
||||
@ -76,9 +76,9 @@ class Auth extends CI_Controller
|
||||
|
||||
// Login WIN!
|
||||
|
||||
if ($this->db_session->flashdata('tried_to'))
|
||||
if ($this->session->flashdata('tried_to'))
|
||||
{
|
||||
redirect($this->db_session->flashdata('tried_to'));
|
||||
redirect($this->session->flashdata('tried_to'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -89,7 +89,7 @@ class Auth extends CI_Controller
|
||||
{
|
||||
|
||||
// Login FAIL
|
||||
$this->db_session->set_flashdata('login_error', 'Incorrect username or password.');
|
||||
$this->session->set_flashdata('login_error', 'Incorrect username or password.');
|
||||
$this->load->view('auth/login_form');
|
||||
}
|
||||
}
|
||||
@ -104,10 +104,10 @@ class Auth extends CI_Controller
|
||||
function logout()
|
||||
{
|
||||
|
||||
if ($this->db_session->userdata('logged_in'))
|
||||
if ($this->session->userdata('logged_in'))
|
||||
{
|
||||
$data['name'] = $this->db_session->userdata('cn');
|
||||
$data['username'] = $this->db_session->userdata('username');
|
||||
$data['name'] = $this->session->userdata('cn');
|
||||
$data['username'] = $this->session->userdata('username');
|
||||
$data['logged_in'] = TRUE;
|
||||
$this->auth_ldap->logout();
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class Auth_Ldap {
|
||||
log_message('debug', 'Auth_Ldap initialization commencing...');
|
||||
|
||||
// Load the session library
|
||||
$this->ci->load->library('db_session');
|
||||
$this->ci->load->library('session');
|
||||
|
||||
// Load the configuration
|
||||
$this->ci->load->config('auth_ldap');
|
||||
@ -104,7 +104,7 @@ class Auth_Ldap {
|
||||
'role' => $user_info['role'],
|
||||
'logged_in' => TRUE);
|
||||
|
||||
$this->ci->db_session->set_userdata($customdata);
|
||||
$this->ci->session->set_userdata($customdata);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ class Auth_Ldap {
|
||||
* @return bool
|
||||
*/
|
||||
function is_authenticated() {
|
||||
if($this->ci->db_session->userdata('logged_in')) {
|
||||
if($this->ci->session->userdata('logged_in')) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
@ -125,8 +125,8 @@ class Auth_Ldap {
|
||||
*/
|
||||
function logout() {
|
||||
// Just set logged_in to FALSE and then destroy everything for good measure
|
||||
$this->ci->db_session->set_userdata(array('logged_in' => FALSE));
|
||||
$this->ci->db_session->sess_destroy();
|
||||
$this->ci->session->set_userdata(array('logged_in' => FALSE));
|
||||
$this->ci->session->sess_destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php $this->load->view('defaults/header'); ?>
|
||||
<?php
|
||||
$message = $this->db_session->flashdata('login_error');
|
||||
$message = $this->session->flashdata('login_error');
|
||||
if ($message){
|
||||
echo '<div class="login_error">';
|
||||
echo $message;
|
||||
|
Loading…
x
Reference in New Issue
Block a user