# Undefined variable: check\_user\_email

**URL:** https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811
**Category:** Wordpress Plugin
**Created:** [July 2, 2018, 5:29pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811 "2018-07-02T17:29:18Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![ricky](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ricky](https://www.patreondevelopers.com/u/ricky)
#### Post date: [July 2, 2018, 5:29pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/1 "2018-07-02T17:29:19Z")

</div>

Hi there!

I’ve got a considerable number of players complaining they can’t login using the plugin. They say the click the “Unlock with Patreon”, then “Allow” and then return to the post without unlocking it (stuck in loop).

I can reproduce the issue since it works correctly on my testing account; however, I enabled WP debug some days ago to see if I could catch something and I noticed some errors there related to the plugin:  
[https://pastebin.com/x39gZtJU](https://pastebin.com/x39gZtJU)

Versions of my plugins:  
Patreon Wordpress: 3.0.2  
Patron Plugin Pro by CodeBard: 1.0.9  
Patreon Button, Widgets and Plugin by CodeBard: 2.0.4

Server:  
Ubuntu 14 LTS  
PHP: PHP 5.5.9-1ubuntu4.25 (cli)

Does anyone know something about this? Any tip will be highly appreciated.  
Best,  
Ricky.

---

<div class="post-metadata">

### Author: ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)
#### Post date: [July 2, 2018, 5:56pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/2 "2018-07-02T17:56:05Z")

</div>

Undefined var notice shouldnt have any effect.  
…

Please first update your Patron Pro to the latest version, and make sure that your access credentials at Patreon API are correct and no token is listed as expired. All tokens must be fresh (none expired) and they must match what you put into the settings in your plugin admin at your WP site.

---

<div class="post-metadata">

### Author: ![ricky](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ricky](https://www.patreondevelopers.com/u/ricky)
#### Post date: [July 2, 2018, 5:58pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/3 "2018-07-02T17:58:36Z")

</div>

Hey, thanks for your reply. Isn’t 1.0.9 the latest version for Patron Pro? I didn’t get any update warning. About the tokens: we did check them and they’re fine.

---

<div class="post-metadata">

### Author: ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)
#### Post date: [July 2, 2018, 5:59pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/4 "2018-07-02T17:59:35Z")

</div>

1.1.0, 1.1.1 were out since a long while. 1.1.2 went out just today.

Also update your patreon wordpress version.

---

<div class="post-metadata">

### Author: ![ricky](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ricky](https://www.patreondevelopers.com/u/ricky)
#### Post date: [July 2, 2018, 6:17pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/5 "2018-07-02T18:17:59Z")

</div>

Oh, now the warning do appear:  
A new version of Patron Plugin Pro is available! Please update your plugin to benefit from security fixes, bug fixes and new features. To update your plugin, click here.

However, the link is broken and show me “The link you followed has expired.”. It seems like I’ll need to update them manually…

---

<div class="post-metadata">

### Author: ![ricky](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ricky](https://www.patreondevelopers.com/u/ricky)
#### Post date: [July 2, 2018, 7:58pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/6 "2018-07-02T19:58:32Z")

</div>

Okay, plug-ins updated to the latest version. I just checked my debug log and still see an error:  
[02-Jul-2018 19:54:28 UTC] PHP Notice: Undefined variable: check\_user\_email in /var/www/html/play/wp-content/plugins/patreon-wordpress/classes/patreon\_login.php on line 178

IDN if this might or not be a problem.

---

<div class="post-metadata">

### Author: ![ricky](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ricky](https://www.patreondevelopers.com/u/ricky)
#### Post date: [July 3, 2018, 2:12pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/7 "2018-07-03T14:12:38Z")

</div>

Other message that has been appearing in the log:  
[03-Jul-2018 03:30:37 UTC] PHP Warning: array\_key\_exists() expects parameter 2 to be array, null given in /var/www/html/play/wp-content/plugins/patreon-wordpress/classes/patreon\_routing.php on line 247

Am I still have some users complaining about the “loop” in the log-in. All plugins are up to date, cache was flushed and Patreon client was refreshed just in case (it wasn’t expired). I’m clueless of what to do.

---

<div class="post-metadata">

### Author: ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)
#### Post date: [July 3, 2018, 7:01pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/8 "2018-07-03T19:01:11Z")

</div>

This seems to necessitate an on-site look.

Please arrange me an admin user/pass at your WP site, and FTP access if possible - and mail me at [ozgur@c.patreon.com](mailto:ozgur@c.patreon.com)

Also please let me know if we can do live code changes and tests at your site.

---

<div class="post-metadata">

### Author: ![ricky](https://avatars.discourse-cdn.com/v4/letter/r/439d5e/32.png) [@ricky](https://www.patreondevelopers.com/u/ricky)
#### Post date: [July 3, 2018, 7:37pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/9 "2018-07-03T19:37:44Z")

</div>

I sent the requested information. Thanks.

---

<div class="post-metadata">

### Author: ![Ekhnaton](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/ekhnaton/32/591_2.png) [@Ekhnaton](https://www.patreondevelopers.com/u/Ekhnaton)
#### Post date: [July 4, 2018, 12:01pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/10 "2018-07-04T12:01:40Z")

</div>

Same problem here:

Warning: array\_key\_exists() expects parameter 2 to be array, null given in /home2/ekhnaton/hornstown.com/2/wp-content/plugins/patreon-connect/classes/patreon\_routing.php on line 247

Please let me know if you have any solutions 🙂 Thx.

---

<div class="post-metadata">

### Author: ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)
#### Post date: [July 6, 2018, 6:36pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/11 "2018-07-06T18:36:43Z")

</div>

Notices and warnings should not be on at a production site. Please try turning them off and then checking out if the issue persists.

---

<div class="post-metadata">

### Author: ![Sailbourne](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/sailbourne/32/594_2.png) [@Sailbourne](https://www.patreondevelopers.com/u/Sailbourne)
#### Post date: [July 6, 2018, 8:15pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/12 "2018-07-06T20:15:38Z")

</div>

I am having a similar issue: I can login using my personal Patreon account, but when I try to use our creator account, I get the loop that Ricky described – just takes me back to the login screen.

Patreon Wordpress plugin is updated to version 1.1.2.

I’m not running the Patron Plugin Pro or Patreon Button, Widgets & Plugin.

---

<div class="post-metadata">

### Author: ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)
#### Post date: [July 6, 2018, 11:19pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/13 "2018-07-06T23:19:24Z")

</div>

In the current state, the plugin should not unlock content for creator accounts since a creator cant be a patron of himself/herself. So, it doesnt unlock content for creator accounts unless the account is linked to a WP admin account.

It seems it will be good if we added a message or just make the plugin unlock the content if someone is logged in as the creator, but not as a site admin.

---

<div class="post-metadata">

### Author: ![Sailbourne](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/sailbourne/32/594_2.png) [@Sailbourne](https://www.patreondevelopers.com/u/Sailbourne)
#### Post date: [July 7, 2018, 12:46am UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/14 "2018-07-07T00:46:30Z")

</div>

Okay, so this is expected behavior at this point. I appreciate the information! I do agree it would be better if the plugin unlocked the content, or at least offered an informational message.

Thanks again.

---

<div class="post-metadata">

### Author: ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)
#### Post date: [July 7, 2018, 11:57pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/15 "2018-07-07T23:57:49Z")

</div>

To all participating in this thread:

Please delete the existing Patreon WordPress on your site (deactivate first), then upload and activate the below package with oauth error reporting and see if it sheds any light on this issue by showing an error:

> **[patreon-wordpress.zip](https://www.dropbox.com/s/pi76jyf2ciqt4wb/patreon-wordpress.zip?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

### Author: ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)
#### Post date: [July 10, 2018, 5:24pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/16 "2018-07-10T17:24:51Z")

</div>

All who participated in this thread: API’s cloudflare settings were just readjusted by Patreon. Please check it out and see if you can reproduce the cloudflare-block.

---

<div class="post-metadata">

### Author: ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)
#### Post date: [July 12, 2018, 5:14pm UTC](https://www.patreondevelopers.com/t/undefined-variable-check-user-email/811/17 "2018-07-12T17:14:48Z")

</div>

To all participants of the thread: There were changes made at CloudFlare to address this issue just today.

Please try to reproduce the issue and let us know if it occurs, or if you are not able to reproduce it at all. Any input is appreciated.
