[eluser]Sein Kraft[/eluser]
Hi everybody!
I'm working in a user management system and I've a trouble x3
I have a function called "Activate" with a variable catch.
Code:
function Activate($key)
{
}
And the system has the possibility of detect the content of $key. If the variable have data jump to the model to activate the user. And If not show a view with a simple form who request the activation key an then call the model and activate.
Code:
function Activate($key)
{
if ($key = '')
{
//form validation...
$this->load->view('user_activate', $data);
}
else
{
//send $key to model...
$this->load->model('model_user','', TRUE);
$this->model_user->activate_user($key);
}
}
But the system doesn't work properly. It show an error in the first line of the function because it expect a value with content, not a null value.