customer_id is registered after login at OSCommerce
you can check or get user id like this and can use as want
if (!tep_session_is_registered('customer_id')){
$userid ='';
} else{
$userid = $customer_id ;
}
echo $userid;
function tep_session_is_registered is used for checking is the customer_id in the session or not if not than user is not yet logged in.
tep_session_is_registered return true(if user logged in) or false(if user not loggged in )
$customer_id contain the current logged in user id.