Welcome Guest, Not a member yet? Register   Sign In
Strange issue with validation libraries
#9

[eluser]daweb[/eluser]
Another no Xwero.

The callback function is a method of my controller.

Code:
<?php
class Login extends Controller {

    function __construct()
    {
        parent::Controller();
        $this->load->helper('form');
        $this->load->helper('security');
        // utente non autorizzato
        $this->authUser = FALSE;          
        $this->load->library('validation');
        $this->load->model('settings_model', 'set');
    }

    function index()
    {
        $data_stack['pageTitle']   = $this->lang->line('titleLogin');
        $this->load->view('admin/custom_validation/logins_validation.php', '', FALSE);
        if($this->validation->run() == TRUE)
        {
            redirect('front', 'location');
            exit();
        }

        $this->load->view('admin/login/index', $data_stack);
    }
    
    function check_login()
    {
      $username = $this->input->post('username');
      $password = dohash($this->input->post('password'));
      if ($this->erkanaauth->try_login(array('username'=>$username, 'password'=>$password)))
      {
        $this->erkanaauth->updateLastVisit();
        return TRUE;
      }
      else
      {
        $this->validation->set_message('check_login', 'Errore, utente e/o password errati');
        return FALSE;
      }
    }
} // END Front
?>


Messages In This Thread
Strange issue with validation libraries - by El Forum - 02-11-2008, 03:35 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 03:48 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 04:14 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 04:15 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 04:17 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 04:19 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 04:22 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 04:38 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 04:44 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 04:48 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 05:00 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 05:23 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 05:27 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 06:03 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 06:11 AM
Strange issue with validation libraries - by El Forum - 02-11-2008, 02:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB