Ok
I give you my last notes and sugestions about auth, FAL_front and Freakauth_light files
I will work on admin files next days….
Resume of my previous notes and fix….
File: FAL_front.php : post
delete line 234 & 235
//if activated in config, sets the select country box
if ($this->CI->config->item('FAL_use_country'))
====================================================================================
File: FAL_front.php , FAL_validation.php & Freakauth_light.php : post
Change the fal_validation->login_check() to speed Up the code by acceded the database only one time.
Change the condition in FAL_front->login() function line 150 to:
//Modification
//if ($validation_response==TRUE && $this->CI->fal_validation->login_check($username_login, $password_login))
if ($validation_response==TRUE && $this->CI->fal_validation->login_check())
//......
And replace the fal_validation->login_check() by:
//Modifictaion
//function login_check($username_login, $password_login)
function login_check()
{
if ($this->CI->freakauth_light->login())
{
return true;
}
else
{
//let's set the message
$this->login_error_message = this->_error_prefix.$this->CI->lang->line('FAL_invalid_username_password_message').$this->_error_suffix;
return false;
}
}
//......
====================================================================================
File: register.php the form template view : post
the Cancel button have no effect when ‘FAL_terms_of_service_message’ == ’’ (see my propositions)
and at line 98 replace base_url() by site_url()
====================================================================================
File: FAL_front.php : post
support for auth controller into subfolder in activation() function (only one level, CI doesn’t support more)
replace line 325 by this two lines:
$id_ind=(str_replace("/","",$this->CI->uri->router->fetch_directory()) != "")? 4:3;
if ($this->CI->freakauth_light->activation($this->CI->uri->segment($id_ind, 0), $this->CI->uri->segment($id_ind+1, '')))
//......
====================================================================================
NEW notes and fix….
File: FAL_front.php :
Similar than the previous for activation function.
support for auth controller into subfolder in forgotten_password_reset() function (only one level, CI doesn’t support more)
replace line 430 by this two lines:
$id_ind=(str_replace("/","",$this->CI->uri->router->fetch_directory()) != "")? 4:3;
if ($this->CI->freakauth_light->forgotten_password_reset($this->CI->uri->segment($id_ind, 0), $this->CI->uri->segment($id_ind+1, '')))
//......
=========================================================================
File: Freakauth_light.php :(the librarie)
In many place you make wrong call to the CI->load->view() function. In fact it is in all the sending email functions…...
You do:
$message = $this->CI->load->view($this->CI->config->item('view').$this->CI->config->item('FAL_forgotten_password_reset_email').EXT, $data, true);
//......
You have to do:
$message = $this->CI->load->view($this->CI->config->item('FAL_forgotten_password_reset_email'), $data, true);
//......
you have to delete: $this->CI->config->item(‘view’). and .EXT because CI->load->view() doesn’t need it to work.
In fact your code work because $this->CI->config->item(‘view’) doesn’t exist so it is always empty but if an user define this config for other purpose this will crash this call.
so delete this two peace of text :$this->CI->config->item(‘view’). and .EXT
at lines 1087,1111,1139 and 1162.
=================================================================
Files: activation_email.php, change_password_email.php, forgotten_password_email.php and forgotten_password_reset_email.php the email template files…
It is a little thing but as I have said for register.php (see before)
It will be better to use site_url() instead of base_url() for the site link into the emails…..
=================================================================
File: register.php the template form view.
In this view you use a global div container,<div id=“register”> </div>, around the form, but in all other view you don’t use it.
The css is also confuse with this particularity. It should be clearer if all the form view use the same scheme.
So we could delete it and modify the css for the same result into register form.
==================================================================
That’s all