Welcome Guest, Not a member yet? Register   Sign In
Cannot find class
#1

[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


#2

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

[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




Theme © iAndrew 2016 - Forum software by © MyBB