Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Call to undefined method Front::run()
#1

[eluser]solid9[/eluser]
Hi guys,

I'm using HMVC

And I'm having error message below,
Code:
Fatal error: Call to undefined method Front::run() in /home/coder9/public_html/jazauthhmvc/application/modules/front/controllers/front.php on line 137

These are the codes for /front/login/ method
Code:
function login()
{
  $this->form_validation->set_rules('username', 'Username', 'required');
  $this->form_validation->set_rules('password', 'Password', 'required');
  
  //if ($this->form_validation->run() == FALSE)
  if ($this->form_validation->CI->run() == FALSE)
  {
   //If validation has error display form again with error messages.  
   $this->index();
  }
  else
  {
   //If form validation has no error catch $username and $password
   //Call login method
   $username = $this->input->post('username', TRUE);
   $password = $this->input->post('password', TRUE);
   $this->data['remember'] = $this->input->post('remember', TRUE);
  
   if($this->users_model->login($username, $password))
   {
    if($this->data['remember'] == 'accept')
    {
     //if remember-me is selected save to cookie.
     $this->jaz_lib->save_cookie($username, $password);
    
     //Save remember into session.
     $this->session->set_userdata('remember', $this->data['remember']);
    }
    //redirect to front page.
    $this->session->set_flashdata('message', 'Welcome back! ');
    redirect('front/home_page');
   }
   else
   {
    //If login failed display error message.
    $this->session->set_flashdata('message', 'Invalid username or password.');
    redirect('front/home_page');
   }
  }

The error message will show when you try to login without entering a username and password below,
http://coder9.com/jazauthhmvc/

What I'm missing here?

Thanks in advance.



Messages In This Thread
Fatal error: Call to undefined method Front::run() - by El Forum - 04-28-2014, 11:03 PM
Fatal error: Call to undefined method Front::run() - by El Forum - 04-28-2014, 11:25 PM
Fatal error: Call to undefined method Front::run() - by El Forum - 04-28-2014, 11:44 PM
Fatal error: Call to undefined method Front::run() - by El Forum - 04-29-2014, 01:16 AM
Fatal error: Call to undefined method Front::run() - by El Forum - 04-29-2014, 07:59 AM
Fatal error: Call to undefined method Front::run() - by El Forum - 04-29-2014, 06:36 PM
Fatal error: Call to undefined method Front::run() - by El Forum - 04-29-2014, 11:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB