Code Duplication    Length = 10-10 lines in 2 locations

application/libraries/DX_Auth.php 2 locations

@@ 736-745 (lines=10) @@
733
734
    // Check if username is available to use, by making sure there is no same username in the database
735
736
    public function is_username_available($username) {
737
        // Load Models
738
        $this->ci->load->model('dx_auth/users', 'users');
739
        $this->ci->load->model('dx_auth/user_temp', 'user_temp');
740
741
        $users = $this->ci->users->check_username($username);
742
        $temp = $this->ci->user_temp->check_username($username);
743
744
        return $users->num_rows() + $temp->num_rows() == 0;
745
    }
746
747
    // Check if email is available to use, by making sure there is no same email in the database
748
@@ 749-758 (lines=10) @@
746
747
    // Check if email is available to use, by making sure there is no same email in the database
748
749
    public function is_email_available($email) {
750
        // Load Models
751
        $this->ci->load->model('dx_auth/users', 'users');
752
        $this->ci->load->model('dx_auth/user_temp', 'user_temp');
753
754
        $users = $this->ci->users->check_email($email);
755
        $temp = $this->ci->user_temp->check_email($email);
756
757
        return $users->num_rows() + $temp->num_rows() == 0;
758
    }
759
760
    // Check if login attempts bigger than max login attempts specified in config
761