CodeIgniter Forums
Cannot find class - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Cannot find class (/thread-53046.html)



Cannot find class - El Forum - 07-09-2012

[eluser]wesleychristelis[/eluser]
I have this model with User.php

and obviosly a class User that extends activerecord model.

when login with my user cred.

I get the following error:

Fatal error: Class 'User' not found in C:\wamp\www\Projects\DBView\application\controllers\auth.php on line 12

my auth.php file looks as follows :


class Auth extends MY_Controller
{
function login()
{
$data = array();

if($_POST)
{
// The user has submitted the login form
$user = User::validate_login($_POST['username'], $_POST['password']);

if($user)
redirect('dashboard');
else
$data['message'] = 'The user / password combination that you have entered is invalid.';
}

$this->load->view('auth/login', $data);
}

function logout()
{
User::logout();

redirect('');
}
}

what am i missing ... sorry new to this





Cannot find class - El Forum - 07-09-2012

[eluser]skunkbad[/eluser]
Where are you including / requiring the User class? Have you read the user guide?


Cannot find class - El Forum - 07-10-2012

[eluser]wesleychristelis[/eluser]
HI yes ... there was a problem in the MY_Loader class that is given , when using Active Record ... an update was done