i seem to be getting this error:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Userbackend::$validation
Filename: controllers/userbackend.php
Line Number: 31
it’s referring to this:
function login($data = array()) {
// set required fields for validation
$rules['username'] = "required";
$this->validation->set_rules($rules);
$fields['username'] = "Username";
$this->validation->set_fields($fields);
// if post variables are set, run validation
if ($this->validation->run()) {
$login_ok = $this->ezauth->login(); // $login_ok returns authorize = true or false depending on user login information
if ($login_ok['authorize'] == true) {
$this->ezauth->remember_user(); // store username in cookie
redirect('userbackend'); // if user logs in successfully, redirect to main page
} else {
$data['error_string'] = $login_ok['error'];
}
}
$this->load->view('login/index',$data);
}
any suggestions? I’m using CI 1.5.4
Many thanks
