Skip to content

Commit

Permalink
Merge pull request #30 from trustedlogin/issue/24-pagenow
Browse files Browse the repository at this point in the history
Address potential issue with frontend profile editing
  • Loading branch information
zackkatz committed Apr 19, 2022
2 parents 8b5b545 + cd11239 commit f5495b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion inc/class.rda-remove-access.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function dashboard_redirect() {
/** @global string $pagenow */
global $pagenow;

if ( 'profile.php' != $pagenow || ! $this->settings['enable_profile'] ) {
if ( ( $pagenow && 'profile.php' !== $pagenow ) || ( defined( 'IS_PROFILE_PAGE' ) && ! IS_PROFILE_PAGE ) || ! $this->settings['enable_profile'] ) {
wp_redirect( $this->settings['redirect_url'] );
exit;
}
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ example.com/options-general.php?page=dashboard-access&rda_debug=1

== Changelog ==

= 1.1.4 on April 18, 2022 =

* Resolved: Issue when front-end editing of profiles when the `$pagenow` global is not defined ([#24](https://github.com/trustedlogin/Remove-Dashboard-Access/issues/24))
= 1.1.3 =

* Fixed a compatibility issue with bbPress and the media grid view.
Expand Down

0 comments on commit f5495b5

Please sign in to comment.