Customers weren't able to change the application language in frontend.

This commit is contained in:
alext 2017-08-01 08:39:03 +02:00
parent 1212cd51f3
commit cdde2fb501

View file

@ -41,7 +41,10 @@ class Backend_api extends CI_Controller {
$this->load->library('session'); $this->load->library('session');
$this->load->model('roles_model'); $this->load->model('roles_model');
$this->privileges = $this->roles_model->get_privileges($this->session->userdata('role_slug'));
if ($this->session->userdata('role_slug')) {
$this->privileges = $this->roles_model->get_privileges($this->session->userdata('role_slug'));
}
// Set user's selected language. // Set user's selected language.
if ($this->session->userdata('language')) { if ($this->session->userdata('language')) {