Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2

[eluser]Ben Edmunds[/eluser]
malcomhfc,

You probably only want to insert the user id. You can't stick an array in a DB field without serializing it, and that is bad practice for most situations.

Are you using Ion Auth v1 or v2?

v1 code is:
Code:
$user = $this->ion_auth->get_user();
if($this->comment_m->addWebsite(array('doWebsite' => $this->input->post('doWebsite'), 'doUser' => $user->id)))

v2 code is:
Code:
$user = $this->ion_auth->user()->result();
if($this->comment_m->addWebsite(array('doWebsite' => $this->input->post('doWebsite'), 'doUser' => $user->id)))


Messages In This Thread
Ion Auth - Lightweight Auth System based on Redux Auth 2 - by El Forum - 05-27-2011, 01:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB