api_not_allowed() now deals with missing cidReq (normally showing "not allowed" message) by sending the user to the user_portal.php script (no login necessary)
Display :: display_error_message("<p>Either you are not allowed here or your session has expired.<br/><br/>Please try to login again using the following form: <br/>".$test,false);
echo '</div>';
@ -1354,6 +1363,7 @@ function api_not_allowed()
die();
}else{
//if no course ID was included in the requested URL, redirect to homepage
Display::display_header();
echo '<divalign="center">';
Display :: display_error_message('<p>Either you are not allowed here or your session has expired.<br/><br/><ahref="'.$home_url.'">Please try to login again from the homepage</a><br/>',false);