Skip to content

Commit 0c2945d

Browse files
committed
Require user when authorising
1 parent 9889389 commit 0c2945d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

inc/types/class-base.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ public function handle_authorisation() {
5757
return $redirect_uri;
5858
}
5959

60+
// Valid parameters, ensure the user is logged in.
61+
if ( ! is_user_logged_in() ) {
62+
$url = wp_login_url( $_SERVER['REQUEST_URI'] );
63+
wp_safe_redirect( $url );
64+
exit;
65+
}
66+
6067
if ( empty( $_POST['_wpnonce'] ) ) {
6168
return $this->render_form( $client );
6269
}

0 commit comments

Comments
 (0)