just connect to the forum database and if the user is registered there then proceed with login. Not really hard. Simple MySQL query could determine it.
$sql = "SELECT * FROM table_name WHERE field_name='$field_name' AND field_name2='$field_name2'";
$query = mysql_query($sql) or die("Could not run query: " .mysql_erorr());
That is a very basic example but essentially is what needs to be done. Obviously I left a lot of stuff out but the main query is there.