Title: Tim Oxendale's Replies | WordPress.org

---

# Tim Oxendale

  [  ](https://wordpress.org/support/users/timssolutions/)

 *   [Profile](https://wordpress.org/support/users/timssolutions/)
 *   [Topics Started](https://wordpress.org/support/users/timssolutions/topics/)
 *   [Replies Created](https://wordpress.org/support/users/timssolutions/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/timssolutions/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/timssolutions/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/timssolutions/engagements/)
 *   [Favorites](https://wordpress.org/support/users/timssolutions/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/users/timssolutions/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/timssolutions/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Save Manual Order User for WooCommerce] New User Activation Email Send to Customer](https://wordpress.org/support/topic/new-user-activation-email-send-to-customer/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [8 months, 1 week ago](https://wordpress.org/support/topic/new-user-activation-email-send-to-customer/#post-18719101)
 * Yeah, I’ll swap that!  
 * I had thought I had already done it, someone asked a while ago but clearly I 
   didn’t get to changing it.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Save Manual Order User for WooCommerce] New User Activation Email Send to Customer](https://wordpress.org/support/topic/new-user-activation-email-send-to-customer/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [8 months, 2 weeks ago](https://wordpress.org/support/topic/new-user-activation-email-send-to-customer/#post-18713165)
 * Hello and thanks for reaching out, the plugin doesn’t send any emails. It’s most
   likely something else you have set up on your site that’s triggering the email
   when a user is registered.
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[Tim's Nextcloud SSO OAuth2] Works like a charm!](https://wordpress.org/support/topic/works-like-a-charm-2299/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/works-like-a-charm-2299/#post-17402150)
 * Glad you like it! Don’t worry I’m happy with the nice review.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] nc-sso-error=unexpected](https://wordpress.org/support/topic/nc-sso-errorunexpected/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years ago](https://wordpress.org/support/topic/nc-sso-errorunexpected/#post-15825051)
 * Hey, not sure what else to suggest. it’s got to be a problem with Nextcloud or
   the dependencies it needs. Maybe head over to the Nextcloud forum and post about
   not being able to access the OCS API and see if you get any further joy there.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] nc-sso-error=unexpected](https://wordpress.org/support/topic/nc-sso-errorunexpected/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years ago](https://wordpress.org/support/topic/nc-sso-errorunexpected/#post-15818808)
 * Hey, looking at your log they already are disabled, the plugin will work with
   enabled/disabled Pretty Links, you just need to alter the Nextcloud URL in the
   settings. If Pretty Links are disabled you just need to add /index.php/ to the
   end of the Nextcloud URL.
 * The test connection button will flag if it’s not right.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] nc-sso-error=unexpected](https://wordpress.org/support/topic/nc-sso-errorunexpected/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years ago](https://wordpress.org/support/topic/nc-sso-errorunexpected/#post-15817205)
 * Hey, it’s going to be a problem with Nextcloud, I have set up a fresh install
   of version 24.0.2 in a subfolder with Pretty Links disabled and it worked as 
   expected.
 * When searching the 997 error in Nextcloud it always just seems to be some kind
   of Nextcloud install issue, are you able to try and reinstall Nextcloud?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] nc-sso-error=unexpected](https://wordpress.org/support/topic/nc-sso-errorunexpected/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years ago](https://wordpress.org/support/topic/nc-sso-errorunexpected/#post-15816082)
 * Hey, I have to say I’m not to sure…
 * On step 3 on the settings page, when you click test connection, does that come
   back ok?
 * Do you have any two-factor authentication on for the account in Nextcloud?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] nc-sso-error=unexpected](https://wordpress.org/support/topic/nc-sso-errorunexpected/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years ago](https://wordpress.org/support/topic/nc-sso-errorunexpected/#post-15814081)
 * Hey, thanks for the info, what version of Nextcloud are you using? When the plugin
   is trying to retrieve the user details it’s getting a 997 error from Nextcloud(
   current user is not logged in).
 * Can you check on your Nextcloud server that Apache mod_headers, mod_rewrite and
   mod_env are enabled?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] Return to same page after login](https://wordpress.org/support/topic/return-to-same-page-after-login/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years ago](https://wordpress.org/support/topic/return-to-same-page-after-login/#post-15779090)
 * Hey, just a follow-up. Version 2.0.0 will manage all of this for you now!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] Return to same page after login](https://wordpress.org/support/topic/return-to-same-page-after-login/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/return-to-same-page-after-login/#post-15715096)
 * Hey, sorry for the slow reply, if you’re doing it that way you would need to 
   add the redirect URL to the login link, e.g. [https://site.xxxx.net/wp-login.php?nc-sso=redirect&redirect_to=](https://site.xxxx.net/wp-login.php?nc-sso=redirect&redirect_to=)**
   ULR_to_go_back_to**
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] Return to same page after login](https://wordpress.org/support/topic/return-to-same-page-after-login/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/return-to-same-page-after-login/#post-15669373)
 * Hey, make sure you are on version 1.9 or later (I have added some new filter 
   hooks in this version). Then if you add the following into your theme functions.
   php file, that should do it!
 *     ```
       add_filter('tims_nso_nextcloud_login_button_url', 'add_redirect_to_query_string');
       function add_redirect_to_query_string($login_button_url){
       	if(get_the_ID()){
       		$login_button_url = $login_button_url.'&redirect_to='.urlencode(esc_url_raw(get_permalink(get_the_ID())));
       	}
       	return $login_button_url;
       }
   
       add_filter('tims_nso_authorize_url', 'add_redirect_to_query_string_to_session');
       function add_redirect_to_query_string_to_session($authorize_url){
       	if(session_status() === PHP_SESSION_NONE) {
       	    session_start();
       	}
       	if(isset($_GET['redirect_to'])){
       		$_SESSION['original_page'] = esc_url_raw(urldecode($_GET['redirect_to']));
       	}
       	return $authorize_url;
       }
   
       add_filter('tims_nso_successful_login_redirect', 'redirect_user_back_to_original_page');
       function redirect_user_back_to_original_page($redirect_url){
       	if(session_status() === PHP_SESSION_NONE) {
       	    session_start();
       	}
       	if(isset($_SESSION['original_page']) && filter_var($_SESSION['original_page'], FILTER_VALIDATE_URL)){
       		$redirect_url = esc_url_raw($_SESSION['original_page']);
       	}
       	return $redirect_url;
       }
       ```
   
 * so the first filter gets the page URL from the page ID and adds it to the Nextcloud
   login button redirect_to=…
 * the second checks the redirect_to=… parameter and adds it to the session just
   before the user goes off to Nextcloud.
 * Then the final one checks the session for the redirect and sets the redirect 
   URL to that page.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] Security Warning Every Login](https://wordpress.org/support/topic/security-warning-every-login/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/security-warning-every-login/#post-15662785)
 * Hello, that message is all Nextcloud sadly, I’m not aware of any way you can 
   change or bypass it. It might be worth heading over to Nextcloud and adding it
   to the [feature request list](https://help.nextcloud.com/tag/featurerequest).
 * Sorry I couldn’t be of more help.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] nc-sso-error=returned-invalid](https://wordpress.org/support/topic/nc-sso-errorreturned-invalid/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nc-sso-errorreturned-invalid/#post-15472497)
 * Glad it’s working!
 * Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] nc-sso-error=returned-invalid](https://wordpress.org/support/topic/nc-sso-errorreturned-invalid/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nc-sso-errorreturned-invalid/#post-15471239)
 * That’s disappointing, I have really no idea what’s going wrong then. Would it
   be possible to get an admin login to one of the WordPress sites? You can email
   it to me directly at [tim@oxendale.net](https://wordpress.org/support/users/timssolutions/replies/tim@oxendale.net?output_format=md)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Tim's Nextcloud SSO OAuth2] nc-sso-error=returned-invalid](https://wordpress.org/support/topic/nc-sso-errorreturned-invalid/)
 *  Plugin Author [Tim Oxendale](https://wordpress.org/support/users/timssolutions/)
 * (@timssolutions)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/nc-sso-errorreturned-invalid/#post-15469364)
 * If you update again and go to the settings you can now change the new “Temp Key
   Storage Type” from Session to Cookie and that will bypass the PHP session completely
   which must be being removed when you swap between sites.

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/users/timssolutions/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/timssolutions/replies/page/2/?output_format=md)