r/codeigniter • • Nov 29 '17

Is codeigniter dying ?

Well I’m have aimes troubles with CI, I trying to manage a multi tenant application with shared database and shared application. I search on google for documentation but didn’t find anything , and found documentation for multi tenant application on laravel cakephp symphony ., so the question is, are we assisting to the death of CI ?

1 Upvotes

16 comments sorted by

View all comments

Show parent comments

1

u/elhadi_kh Dec 16 '17

Thanks for the sharing, What I have done is extending every table on my database with a column "id" and on every modal I add $userid = $this->session->userdata('id'); // to get the user's ID $query = $this->db->get_where('view_table', array('patient_id'=> $userid)); // to select the appropriate result Now my question is, how secure is this? if a session is stolen or another thing like that.

1

u/iamzozo Dec 19 '17

Only session hashes stored on the client in cookie, actually the session content is on the server. So it's secure in this manner. You can read more about this topic in multitenant architecture articles, where the same db can be a "weak" solution, since db connections are the same, and if you forget to set one of your query, others account data can be leaked. However, this is almost the same case if you do: echo $this->db->password. Which you are not doing of course :)