i need to unserialize all user session data |
Hello,
I have many try to get unserialize data of users. I want to get all online users in my store so how can i do this??? I have used following code. $CI =& get_instance(); $CI->db->select('*'); $query = $CI->db->get('ci_sessions'); if($query->num_rows() > 0){ foreach ($query->result() as $result): pre(unserialize($result->data)); endforeach; } Sample code from database data filed. __ci_last_regenerate|i:1436435382;user_id|s:1:"1";user|O:8:"stdClass":7:{s:7:"user_id";s:1:"1";s:8:"username";s:4:"test";s:9:"firstname";s:4:"Test";s:8:"lastname";s:4:"Demo";s:5:"email";s:18:"[email protected]";s:5:"about";s:245:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.";s:7:"support";s:245:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.";} |
Welcome Guest, Not a member yet? Register Sign In |