Title: Undefined variable: user_id
Last modified: June 26, 2020

---

# Undefined variable: user_id

 *  Resolved [czaker](https://wordpress.org/support/users/czaker/)
 * (@czaker)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/)
 * Hi,
 * When you submit empty signup form I get a couple of PHP errors:
 * [26-Jun-2020 12:16:01 UTC] PHP Notice: Undefined variable: user_id in /home/findlocaldoctors/
   public_html/wp-content/plugins/network-subsite-user-registration/network-subsite-
   user-registration.php on line 249
 * Thank you in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fundefined-variable-user_id%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13039622)
 * Hi [@czaker](https://wordpress.org/support/users/czaker/)
 * I see the issue, just a few questions..
 * 1) how did you get to the `.../wp-signup.php` ending of the URL? are you manually
   typing ?
    the plugin should be redirecting to a different page .`../local-signup/`
 * 2) also just for info what version of PHP are you running ?
 *  Plugin Author [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13039758)
 * few more questions..
 * 3) is findlocal-doctors.com the main site or a sub-site on the network?
    4) Are
   you running multiple networks (multi-sites) on the same WP install ?
 *  Plugin Author [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13046483)
 * Marked as resolved
 *  Plugin Author [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13046490)
 * I have closed this support ticket in error… please come back with responses to
   my question so that we can resolve the issue correctly. Thanks
 *  Thread Starter [czaker](https://wordpress.org/support/users/czaker/)
 * (@czaker)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13130594)
 * Hi Justin,
 * 1. manually typing
    2. PHP 7.2.32 3. findlocal-doctors.com is a main site 4. 
   I didn’t at the time but now I am
 * Now I have additional error after trying to log in, but they are probably for
   another ticket:
    [16-Jul-2020 10:50:37 UTC] PHP Notice: Undefined index: query
   in /home/findlocaldoctors/public_html/wp-content/plugins/network-subsite-user-
   registration/network-subsite-user-registration.php on line 459 [16-Jul-2020 10:
   50:37 UTC] PHP Notice: Undefined index: redirect_to in /home/findlocaldoctors/
   public_html/wp-content/plugins/network-subsite-user-registration/network-subsite-
   user-registration.php on line 461
 * Thanks!
 *  Plugin Author [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13130697)
 * Ok thanks I’m testing the next version so hopefully that will be available soon.
 * On 1) this url will now redirect to the NSUR landing page to stop confusion is
   allowing the native WP template to load. NSUR uses an very slightly different
   version/copy if WP-signup.php.
 * On your new php error is that seen on WP-admin.php or on /local-signup/ URLs ?
 *  Thread Starter [czaker](https://wordpress.org/support/users/czaker/)
 * (@czaker)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13130708)
 * New errors are on wp-login.php, WP_DEBUG is showing it, but when I refresh the
   page is redirecting me, and I am successfully logged in.
 * It probably has to do with this Wp error: “Error: Cookies are blocked due to 
   unexpected output. For help, please see this documentation or try the support
   forums.” but I’m still working on it.
 * Thank you!
 *  Plugin Author [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13142105)
 * [@czaker](https://wordpress.org/support/users/czaker/) – version 3.0 now fixes
   the errors
 *  Thread Starter [czaker](https://wordpress.org/support/users/czaker/)
 * (@czaker)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13149915)
 * [@justinticktock](https://wordpress.org/support/users/justinticktock/) Thanks,
   I will test it out!
 *  Plugin Author [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13150927)
 * I see from your site that you have hit a different error I’ll work on that now.
 * Notice: Undefined variable: user_id in /home/findlocaldoctors/public_html/wp-
   content/plugins/network-subsite-user-registration/network-subsite-user-registration.
   php on line 294
 *  Thread Starter [czaker](https://wordpress.org/support/users/czaker/)
 * (@czaker)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13150974)
 * Yes, when I submit empty form it shows missing variable.
 * Also when I try to login I have:
    Notice: Undefined index: query in /home/findlocaldoctors/
   public_html/wp-content/plugins/network-subsite-user-registration/network-subsite-
   user-registration.php on line 562
 * Notice: Undefined index: redirect_to in /home/findlocaldoctors/public_html/wp-
   content/plugins/network-subsite-user-registration/network-subsite-user-registration.
   php on line 564
 * The second error might be caused by me, because I am redirecting users to /account/
   page – I will test it.
 * Thanks for all the help.
 *  Plugin Author [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13151106)
 * 3.1 now fixes that too.
 *  Thread Starter [czaker](https://wordpress.org/support/users/czaker/)
 * (@czaker)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13154800)
 * Yes, this error is fixed, thanks!
 * Login errors still remains, I disabled my redirects and I still have them.
 *  Notice: Undefined index: query in /home/findlocaldoctors/public_html/wp-content/
   plugins/network-subsite-user-registration/network-subsite-user-registration.php
   on line 563
 * Notice: Undefined index: redirect_to in /home/findlocaldoctors/public_html/wp-
   content/plugins/network-subsite-user-registration/network-subsite-user-registration.
   php on line 565
 * You can try to log in using those:
    test testpass
 * Thanks
 *  Plugin Author [Justin Fletcher](https://wordpress.org/support/users/justinticktock/)
 * (@justinticktock)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13155587)
 * OK I see that issue, I’ll put it into the next release, however, its a warning
   so the functionality is going to work. you have debug enabled throwing the errors
   to the front of your site, which is good to catch these issues so thanks however
   you could turn that off until the next release.
 *  Thread Starter [czaker](https://wordpress.org/support/users/czaker/)
 * (@czaker)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13159527)
 * Those might be warnings but I can not log in correctly, and I am wondering if
   it’s connected to the plugin.
 * I have:
 * “Error: Cookies are blocked due to unexpected output. For help, please see this
   documentation or try the support forums.”
 * ..and only errors in my error_log are from your plugin. I will investigate further.
 * Thanks!

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

The topic ‘Undefined variable: user_id’ is closed to new replies.

 * ![](https://ps.w.org/network-subsite-user-registration/assets/icon-256x256.png?
   rev=1612217)
 * [Network Subsite User Registration](https://wordpress.org/plugins/network-subsite-user-registration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/network-subsite-user-registration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/network-subsite-user-registration/)
 * [Active Topics](https://wordpress.org/support/plugin/network-subsite-user-registration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/network-subsite-user-registration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/network-subsite-user-registration/reviews/)

 * 15 replies
 * 2 participants
 * Last reply from: [czaker](https://wordpress.org/support/users/czaker/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-user_id/#post-13159527)
 * Status: resolved