Retrieving users profile and displaying it. - 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: Retrieving users profile and displaying it. (/showthread.php?tid=53859) |
Retrieving users profile and displaying it. - El Forum - 08-12-2012 [eluser]puffnstuff[/eluser] Just started with Codeigniter and I am using Ion Auth for members administration. I have a table called "users" with a field of "id" and another "profile" with a field called "id". When the user is logged in I would like to display the users profile with the equivalent id. I think I am close to figuring this out. This is what I have in my users model... Code: function user_profile() { I am not sure if I am way off base and if I am close I am not sure how to go from here to echo out the profile. Retrieving users profile and displaying it. - El Forum - 08-12-2012 [eluser]Pedroshow[/eluser] Code: function user_profile($id) { Retrieving users profile and displaying it. - El Forum - 08-12-2012 [eluser]puffnstuff[/eluser] [quote author="Pedroshow" date="1344782931"] Code: function user_profile($id) { Changed it to that and I am getting... Code: Severity: Warning Code: Severity: Notice Retrieving users profile and displaying it. - El Forum - 08-12-2012 [eluser]Pedroshow[/eluser] you need pass the user id you want to see when you call the model, eg: Code: $this->Profile_model->user_profile(1); Retrieving users profile and displaying it. - El Forum - 08-12-2012 [eluser]puffnstuff[/eluser] [quote author="Pedroshow" date="1344790142"]you need pass the user id you want to see when you call the model, eg: Code: $this->Profile_model->user_profile(1); Great it works thank you so much! |