0
votes

Hi I have my session set to true in codeigniter I use tank auth but when I go use my change email form. after re activating new email got to success page but loads up errors but when I view my database users table email has changed.

The errors that I am showing are.

A PHP Error was encountered Severity: Notice Message: Undefined index: session_id Filename: libraries/Session.php Line Number: 272

A PHP Error was encountered Severity: Notice Message: Undefined index: ip_address Filename: libraries/Session.php Line Number: 272

A PHP Error was encountered Severity: Notice Message: Undefined index: user_agent Filename: libraries/Session.php Line Number: 272

A PHP Error was encountered Severity: Notice Message: Undefined index: last_activity Filename: libraries/Session.php Line Number: 272

A PHP Error was encountered Severity: Notice Message: Undefined index: session_id Filename: libraries/Session.php Line Number: 288

A PHP Error was encountered Severity: Notice Message: Undefined index: last_activity Filename: libraries/Session.php Line Number: 289

A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /home/cws01/public_html/tank/system/core/Exceptions.php:185) Filename: libraries/Session.php Line Number: 675

A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /home/cws01/public_html/tank/system/core/Exceptions.php:185) Filename: helpers/url_helper.php Line Number: 542

$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = TRUE;
$config['sess_encrypt_cookie']  = TRUE;
$config['sess_use_database']    = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update']  = 300;
1

1 Answers

0
votes

Most likely it is due to the sess_destroy() initiated by a logout in Tank_auth Following code in logout function within the Tank_auth library worked for me.

function logout()
{
  $this->tank_auth->logout(); // Destroys session
  $this->ci->session->sess_create();
  redirect('/auth/login');
}

See: Post on ellislab-forum; and this forum..