I want to unset the user session by admin. As I have tried all my tricks but Can't find any way!
I want to remove a user session by clicking on anchor tag which has id of the user.
<a class="pull-right" href="<?= base_url("admin/unset_emp_session/$id")?>">Distroy Session</a>
$id=5;
I used this to unset the session of user so that the user panel will get stop and come back on login page as session has been destroyed by admin.
However, In the user login Controller I have created a session of user by name and id.
$this->session->set_userdata('employee_id', $user_data['id']);
$this->session->set_userdata('employee_name', $user_data['firstname']);
Now, I have unset them in the admin control. How can I do this? Any help will be appreciated.