benedmunds / CodeIgniter-Ion-Auth

Simple and Lightweight Auth System for CodeIgniter
http://benedmunds.com/ion_auth/
MIT License
2.34k stars 1.14k forks source link

DB Sessions Flashdata Error #44

Closed benedmunds closed 13 years ago

benedmunds commented 13 years ago

I just wanted to give a bit of feedback to the great Ion Auth library. My Version is exactly one week old and downloaded from github. Codeigniter is v1.7.3

In your example controller you heavily use flashdata. So did i but in conjunction with database sessions. When I updated a user and got a duplicate error, the new session data could not be stored in the database, because the transaction was not completed and so the flashdata message stayed empty. So here is the fix:

ion_auth_model.php // After line 838, before return FALSE: $this->db->trans_rollback();

benedmunds commented 13 years ago

Fixed: http://github.com/benedmunds/CodeIgniter-Ion-Auth/commit/ce54b51729141f5c06eb1340d932dd66a3671b5d