[eluser]charleslittle.tx[/eluser]
The website lives at:
http://184.72.244.138.
I am not certain what code is necessary to share:
This is the login section of my auth file:
class Auth extends Controller {
function __construct()
{
parent::__construct();
$this->load->library('form_validation');
$this->load->model('account_settings_model');
$this->load->database();}
//redirect if needed, otherwise display the user list
function index()
{
if ( $this->ion_auth->logged_in() )
{
$data = array(
'tpl' => 'content_right/main',
'title' => 'The Web Site'
);
$this->load->view('main_layout', $data);}
else
{$data = array(
'tpl' => 'auth/login',
'title' => 'Login'
);
$this->load->view('main_layout_login', $data);} }
function frame()
{if ( $this->ion_auth->logged_in() )
{
$data = array(
'tpl' => 'content_right/frame',
'title' => 'The Web Site'
);
$this->load->view('main_layout', $data);}
else
{
$data = array(
'tpl' => 'auth/login',
'title' => 'Login'
);
$this->load->view('main_layout_login', $data); } }
/*function index()
{
if (!$this->ion_auth->logged_in())
{
//redirect them to the login page
redirect('auth/login', 'refresh');}
elseif (!$this->ion_auth->is_admin())
{
//redirect them to the home page because they must be an administrator to view this
redirect($this->config->item('base_url'), 'refresh');}
else
{//set the flash data error message if there is one
$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');
//list the users
$this->data['users'] = $this->ion_auth->get_users_array();
$this->load->view('auth/index', $this->data);}}*/
//log the user in
function login()
{if (!empty($_POST))
{
$remember = (bool) $this->input->post('remember');
if ($this->ion_auth->login($this->input->post('email'), $this->input->post('password'), $remember))
{
//if the login is successful redirect them back to the dashboard page
$data = array(
'login_succesful' => 'login');
$user_info = $this->base->get_row('users', $this->session->userdata('id'));
echo json_encode($data);}
else
{
//if the login was un-successful redirect them back to the login page
$data = array(
'login_succesful' => 'no');
echo json_encode($data);}}
else
{$data = array(
'tpl' => 'auth/login',
'title' => 'Login');
$this->load->view('main_layout_login', $data);}
/*//validate form input
$this->form_validation->set_rules('email', 'Email Address', 'required|valid_email');
$this->form_validation->set_rules('password', 'Password', 'required');
if ($this->form_validation->run() == true)
{ //check to see if the user is logging in
//check for "remember me"
$remember = (bool) $this->input->post('remember');
if ($this->ion_auth->login($this->input->post('email'), $this->input->post('password'), $remember))
{ //if the login is successful
//redirect them back to the home page
$this->session->set_flashdata('message', $this->ion_auth->messages());
redirect($this->config->item('base_url'), 'refresh');}
else
{ //if the login was un-successful
//redirect them back to the login page
$this->session->set_flashdata('message', $this->ion_auth->errors());
redirect('auth/login', 'refresh'); //use redirects instead of loading views for compatibility with MY_Controller libraries}}
else
{ //the user is not logging in so display the login page
//set the flash data error message if there is one
$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');
$this->data['email'] = array('name' => 'email',
'id' => 'email',
'type' => 'text',
'value' => $this->form_validation->set_value('email'),);
$this->data['password'] = array('name' => 'password',
'id' => 'password',
'type' => 'password',);
$this->data = array(
'tpl' => 'auth/login',
'title' => 'Login' );
$this->load->view('main_layout', $this->data);
// $this->load->view('auth/login', $this->data);}*/}
I also have an ion_auth model. I don't have a problem with rewrite right now so I don't think there is an issue with the .htaccess file. I hope that this helps! Thank you for the reply.