• I am using UAM on my webpage and hide posts and pages completely, so I can not use the included login form. Often we send links to users to posts or pages not public accessible, so that users need to 1) click link 2) login 3) click link again to get access to post/page.

    To improve usability I have added this code snippet to UserAccessManager.class.php/redirectUser() function before the other 3 redirect elseif-statements.

    if(!is_user_logged_in()){
    	auth_redirect();
    }

    Any logged-out user will be redirected to login page and after login back to the post/page trying to reach at the beginning. Other redirect options will only be used for logged-in users.

    My snippet is just a quick and dirty solution so is there any solution to integrate this without touching plugin code or maybe add this as a new feature (Including option [Try Auth Redirect] at UAM settings page)?

    Thanks in advance – would be a great improvement for me!

    • This topic was modified 7 years, 11 months ago by ju97.
  • The topic ‘add auth_redirect’ is closed to new replies.