I am trying to get this vb auth script working with code igniter;

i think it's using a slightly outdated version of the cookie/auth/password hashing as it wont show users logged in even when they are.

PHP Code:
function is_valid_cookie_user($userid$password
            SELECT username 
                userid = " 
$this->db->escape($userid) . " and 
.$this->license."')) = '$password

now there is a COOKIE_SALT in functions.php which is used along with the md5 pass and the salt in db.

does anyone know how to integrate the correct hash in this?