Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


load a library in a model in codeigniter


load a library in a model in codeigniter  using -'codeigniter'

Why won't my model load the encryption library?

class User_model extends Model {

  function User_model() {
    parent::Model();
    $this->check_login();
  }

  function check_login() {
    $this->load->library('encrypt');
    $email = $this->encrypt->decode($email);
    ....
  }
}


This giving me a PHP error: Call to a member function decode() on a non-object on line X -- where X is the $this->encrypt->decode($email); line?

*Edited to show that the problem was that check_login was called from the constructor*
    

asked Sep 15, 2015 by Ashley26Eygt
0 votes
11 views



Related Hot Questions



Government Jobs Opening


...