Skip to content

Commit cb83aea

Browse files
committed
Remove param token for admins
1 parent 1350abc commit cb83aea

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

plugins/bcc-login/includes/class-bcc-login-visibility.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,15 @@ function on_template_redirect() {
196196

197197
// Show everything to editors
198198
if ( current_user_can( 'edit_posts' ) ) {
199+
if ($param_token) {
200+
// Clean URL if token is also present
201+
if (!defined('DONOTCACHEPAGE')) define('DONOTCACHEPAGE', true);
202+
nocache_headers();
203+
204+
wp_safe_redirect(remove_query_arg($token_name));
205+
exit;
206+
}
207+
199208
return;
200209
}
201210

0 commit comments

Comments
 (0)