Exey - 11 August 2007 05:27 AM
I need login form/user profile on first page, not on single page.
How i can to connect FreakAuth helper, libraries for my main controller?
Actually, I’m on the same situation.
This is how I’m implementing the login form, storing it in a variable for the view:
class Videos extends Controller {
function Videos() {
parent::Controller();
$this->load->library('FAL_front', 'fal_front');
}
function index() {
$data = array();
if (!$this->freakauth_light->isValidUser())
$data['log'] = $this->fal_front->login();
else
$data['log'] = "LOGGED (SHOULD SHOW USER DATA)";
$data['query'] = $this->db->get('videos');
$this->load->view('videos_view', $data);
}
}
Now I got a question:
Is it correct to use the auth controller for auth actions and perform a redirect to the referer URL?
For example, for showing error messages on the same view that the loggin appeared.
I miss an example on the docs that explains this, but am sure that lots of people are doing something like this..