Welcome Guest, Not a member yet? Register   Sign In
Updating DX Auth
#1

[eluser]austintbiggs[/eluser]
I've recently taken on the task of updating a library to allow it to run on CI 2.0.2 [it was written for CI 1.7.0].

From what I've gathered for controllers and models I just need to add the prefix 'CI_' which I've done. what other changes would effect the code that I should watch out for / modify?

I keep receiving the same error
Quote:Fatal error: Call to undefined method CI_Controller::CI_Controller() in /controllers/auth.php on line 12

auth.php
Code:
<?php
class Auth extends CI_Controller
{
    // Used for registering and changing password form validation
    var $min_username = 4;
    var $max_username = 20;
    var $min_password = 4;
    var $max_password = 20;

    public function Auth()
    {
        parent::CI_Controller();
        
        $this->load->library('Form_validation');
        $this->load->library('DX_Auth');            
        
        $this->load->helper('url');
        $this->load->helper('form');
    }
    
    public function index()
    {
        $this->login();
    }
    
    /* Callback function */
    
    public function username_check($username)
    {
        $result = $this->dx_auth->is_username_available($username);
        if ( ! $result)
        {
            $this->form_validation->set_message('username_check', 'Username already exist. Please choose another username.');
        }
                
        return $result;
    }
...

Any and all help is appreciated! [:


Messages In This Thread
Updating DX Auth - by El Forum - 04-12-2011, 12:46 PM
Updating DX Auth - by El Forum - 04-12-2011, 01:35 PM
Updating DX Auth - by El Forum - 04-12-2011, 02:17 PM
Updating DX Auth - by El Forum - 04-17-2011, 10:03 AM
Updating DX Auth - by El Forum - 04-17-2011, 10:51 AM
Updating DX Auth - by El Forum - 04-17-2011, 10:58 AM
Updating DX Auth - by El Forum - 04-17-2011, 11:01 AM
Updating DX Auth - by El Forum - 04-17-2011, 11:07 AM
Updating DX Auth - by El Forum - 04-17-2011, 11:09 AM
Updating DX Auth - by El Forum - 04-17-2011, 11:13 AM
Updating DX Auth - by El Forum - 04-17-2011, 11:23 AM
Updating DX Auth - by El Forum - 04-17-2011, 05:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB