![]() |
Acquisition of user_profile for dx_auth - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Acquisition of user_profile for dx_auth (/showthread.php?tid=15516) |
Acquisition of user_profile for dx_auth - El Forum - 02-06-2009 [eluser]Unknown[/eluser] I would like to display user_profile by /myspace. class Myspace extends Controller { function myspace() { parent::Controller(); $this->load->database(); $this->load->model('dx_auth/user_profile', 'user_profile'); $this->load->library('DX_Auth'); } function index() { if ( !$this->dx_auth->is_logged_in()) { redirect('/auth/login'); } else { $data['username'] = $this->dx_auth->get_username(); $data['userprofile'] = $this->user_profile->get_profile($this->dx_auth->get_user_id() ![]() var_dump($data['userprofile']); } } } However, $data['userprofile'] is bool(false). I have faced Error Number:1064.It is a content of generating a wrong SQL sentence.look at the under. SELECT * WHERE `user_id` = '5' I confirmed models\dx_auth\user_profile. And, it was noticed that $this->_table of the ninth line was empty. What is wrong? Acquisition of user_profile for dx_auth - El Forum - 02-07-2009 [eluser]Unknown[/eluser] The following were added. $this->config->load('dx_auth'); Then, it became it according to hope. Thanks. Acquisition of user_profile for dx_auth - El Forum - 03-15-2009 [eluser]JulianM[/eluser] Thanks ideapon, your hint solved my problem. I added that line of code *before* loading the library and model. Julian |