File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
plugins/bcc-login/includes Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,8 @@ function on_template_redirect() {
178178 // Initiate new login if session has expired
179179 if ( is_user_logged_in () && !$ session_is_valid ) {
180180 $ this ->_client ->end_login ();
181- wp_redirect ( wp_login_url ($ visited_url ) );
182- return ;
181+ wp_safe_redirect ( wp_login_url ($ visited_url ) );
182+ exit ;
183183 }
184184
185185 // Show everything to editors
@@ -210,8 +210,8 @@ function on_template_redirect() {
210210 if ( is_user_logged_in () ) {
211211 return $ this ->not_allowed_to_view_page ($ visited_url );
212212 } else {
213- wp_redirect ( wp_login_url ($ visited_url ) );
214- return ;
213+ wp_safe_redirect ( wp_login_url ($ visited_url ) );
214+ exit ;
215215 }
216216 }
217217
@@ -228,8 +228,8 @@ function on_template_redirect() {
228228 }
229229
230230 if ( !is_user_logged_in () ) {
231- wp_redirect ( wp_login_url ($ visited_url ) );
232- return ;
231+ wp_safe_redirect ( wp_login_url ($ visited_url ) );
232+ exit ;
233233 }
234234
235235 $ user_groups = $ this ->get_current_user_groups ();
You can’t perform that action at this time.
0 commit comments