Welcome Guest, Not a member yet? Register   Sign In
Autologin problem in Freakauth after register
#1

[eluser]Gewa[/eluser]
Hi, I made a custom register controller to make a registration, and for authorization I use Freakauth...


in the end of registration, i want to autologin the person and redirect him to the /myaccount/cabinet part of the website.

[/code]

$_POST['user_name']=$user_login;
$_POST['password']=$user_pass;

$this->load->library('session');



$this->session->set_flashdata('requested_page', base_url().'/myaccount/cabinet/');



$this->load->library('FAL_front', 'fal_front');

$this->_container = $this->config->item('FAL_template_dir').'template/container';
[/code]



This code autologin the user, but redirecting doesn;t work as I want. Why?

If you are an admin, you go to adminpanel, if no to Homepage...Sad((

Please help me to fix...
#2

[eluser]Gewa[/eluser]
please help, pleaaaaaaaaaaaaase
#3

[eluser]Grahack[/eluser]
The 'requested_page' thing is in case of refused access, for the login controller to remember where to redirect the user. So if you don't use this controller, I guess it doesn't work.
Why don't you do call the login() function of the main lib (after setting the post data as you did, and do a simple redirect('myaccount/cabinet')?
#4

[eluser]Gewa[/eluser]
I have solved the problem by making such thing. I have put default redirect place "/myaccount/cabinet" instead of homepage, and it works now fine. Thank you for help




Theme © iAndrew 2016 - Forum software by © MyBB