Viewing 8 replies - 1 through 8 (of 8 total)
  • Because you can’t OR wp_login_url and wp_registration_url like that. You have to check each one individually. Here is my if statement white listing both the Registration page and the Forgot Password page

    if( !is_user_logged_in() && ( ( v_getUrl() != wp_login_url() ) && ( v_getUrl() != wp_registration_url() ) && ( v_getUrl() != wp_lostpassword_url() ) ) )

    It’s possible to do a little boolean algebra and take out some of those parentheses, but I think it makes it clearer this way. I actually came here to suggest the post author adds this to the plugin in the repository.

    Plugin Author Kevin Vess

    (@kevinvess)

    Thanks for the suggestion, I’ll definitely add whitelisting the Registration page and the Forgot Password page to the plugin.

    OK great, thank you.

    You may have a different way of doing it, but I was reading up and found that a better way than checking each value is:

    if( !is_user_logged_in() && !in_array( v_getUrl(), array( wp_login_url(), wp_registration_url(), wp_lostpassword_url() )

    Thread Starter Gabe462

    (@gabe462)

    if( !is_user_logged_in() && !in_array( v_getUrl(), array( wp_login_url(), wp_registration_url(), wp_lostpassword_url() )

    good one @jabdo

    Currently if a user is logged in, they are blocked from editing their profile page. Any whitelist for that instance?

    Thanks.

    Plugin Author Kevin Vess

    (@kevinvess)

    @libsabeth, something else must be causing the profile page from being accessible by your logged in users. EVERYTHING is “whitelisted” when a user is logged in (or at least everything that specific user/user-role has access to is “whitelisted”).

    What happens when a logged in user tries to view their profile page? If you deactivate the Force Login plugin, can logged in users edit their profile page?

    @kevinvess – Thanks for the response. The issue resulted from a DB transfer/update where users were not assigned a role, causing them to be unable to view profile.php.

    Thanks a bunch.

    Plugin Author Kevin Vess

    (@kevinvess)

    @libsabeth –?I’m glad you were able to figure out what was causing your issue with the profile page. Enjoy the plugin and don’t forget to rate and review it. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘whitelist wp_registration_url() ?’ is closed to new replies.