Right after this line in the procRegister function:
* Registration attempt */
$retval = $session->register($_POST['user'], $_POST['pass'], $_POST['email'], $_POST['company']);
just do this
echo 'Return Value: '.$retval;
...and it will print the $retval to screen. The page will probably throw errors after that but it doesn't matter, we're only interested in $retval for now. You can remove it after you know the value.