Maybe this plugins can help you
https://wordpress.org/plugins/pagerestrict/
https://wordpress.org/plugins/wordpress-access-control/
Update
if ( is_user_logged_in() ) {
// you content
}
else {
// you text
}
UPDATE 2
When the user is authorized, him ID was write in global array. This ID you can take from this array.
$current_user = wp_get_current_user();
I don’t know structure your table, but you need to have user ID field like in wp_users
table. Make a request to the database.
global $wpdb
$value = $wpdb->get_result("SELECT `user_name_in_your_table`
FROM `wp_registration`
WHERE `user_id` = '$current_user->ID'");
if($value[0]->user_name_in_your_table !== ''){
//access
} else{
//denied
}