projects
/
WP-Plugins
/
glm-member-db-contacts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67c7877
)
Added a test that we can actually get user information before trying to access that...
author
Chuck Scott
<cscott@gaslightmedia.com>
Thu, 20 Jul 2017 20:18:41 +0000
(16:18 -0400)
committer
Chuck Scott
<cscott@gaslightmedia.com>
Thu, 20 Jul 2017 20:18:41 +0000
(16:18 -0400)
models/admin/contacts/index.php
patch
|
blob
|
history
diff --git
a/models/admin/contacts/index.php
b/models/admin/contacts/index.php
index
bc4fb4a
..
45cc4bd
100644
(file)
--- a/
models/admin/contacts/index.php
+++ b/
models/admin/contacts/index.php
@@
-725,12
+725,15
@@
class GlmMembersAdmin_contacts_index extends GlmDataContacts
{
// Attempt to get WordPress user data
+ $wpUserID = false;
$contactCheck = $this->checkContact($contactInfo['fieldData']['email']);
- $wpUser = new WP_User($contactCheck['wpUserEmail']->ID);
- $wpUserID = $wpUser->ID;
+ if ($contactCheck['wpUserEmail']) {
+ $wpUser = new WP_User($contactCheck['wpUserEmail']->ID);
+ $wpUserID = $wpUser->ID;
+ }
$contactMembersList = '';
-
+
// If we have a valid WordPress user ID
if ($wpUserID) {