Add login status bookshelf error messages

This commit is contained in:
Tetrakern 2024-11-16 01:16:53 +01:00
parent 958e0efdd5
commit 9df1092549
3 changed files with 12 additions and 0 deletions

View File

@ -240,6 +240,10 @@ function fictioneer_ajax_get_finished_checkmarks_list() {
// Validations
$user = fictioneer_get_validated_ajax_user();
if ( ! is_user_logged_in() ) {
wp_send_json_error( array( 'error' => 'You must be logged in.' ) );
}
if ( ! $user ) {
wp_send_json_error( array( 'error' => 'Request did not pass validation.' ) );
}

View File

@ -395,6 +395,10 @@ function fictioneer_ajax_get_follows_list() {
// Validations
$user = fictioneer_get_validated_ajax_user();
if ( ! is_user_logged_in() ) {
wp_send_json_error( array( 'error' => 'You must be logged in.' ) );
}
if ( ! $user ) {
wp_send_json_error( array( 'error' => 'Request did not pass validation.' ) );
}

View File

@ -167,6 +167,10 @@ function fictioneer_ajax_get_reminders_list() {
// Validations
$user = fictioneer_get_validated_ajax_user();
if ( ! is_user_logged_in() ) {
wp_send_json_error( array( 'error' => 'You must be logged in.' ) );
}
if ( ! $user ) {
wp_send_json_error( array( 'error' => 'Request did not pass validation.' ) );
}