From: Chuck Scott Date: Mon, 25 Jan 2016 14:23:34 +0000 (-0500) Subject: Temporarily bypassed login user handling X-Git-Tag: v1.0.8~3^2~4 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=5b7a4eb8473f8eba977f9dd0d42ed6d7c81c7195;p=WP-Plugins%2Fglm-member-db-contacts.git Temporarily bypassed login user handling --- diff --git a/glm-member-db-contacts.php b/glm-member-db-contacts.php index 0c2bc19..563bf40 100644 --- a/glm-member-db-contacts.php +++ b/glm-member-db-contacts.php @@ -184,6 +184,7 @@ require_once(GLM_MEMBERS_CONTACTS_PLUGIN_SETUP_PATH.'/permissions.php'); /* * Notification to user if logging in with restricted contact */ +$wpUserID = get_current_user_id(); function glmMembersContactsNoLoginMessage( $message ) { $message .= "
@@ -193,27 +194,29 @@ function glmMembersContactsNoLoginMessage( $message ) { "; return $message; } -$restrictedLoginAttempt = get_option('glmMembersDatabaseContactsRestrictedLogin'); +/* +$restrictedLoginAttempt = get_user_meta($wpUserID, 'glmMembersDatabaseContactRestrictedLogin', false); if ($restrictedLoginAttempt) { add_filter('login_message', 'glmMembersContactsNoLoginMessage'); - delete_option('glmMembersDatabaseContactsRestrictedLogin'); + delete_user_mega($wpUserID, 'glmMembersDatabaseContactRestrictedLogin'); } if (current_user_can('glm_members_restricted_contact')) { - update_option('glmMembersDatabaseContactsRestrictedLogin', true); + update_user_meta($wpUserID, 'glmMembersDatabaseContactRestrictedLogin', true); wp_logout(); } - +*/ /* * Check for a contact user that's inactive and send them back to login also */ +/* $wpUserID = get_current_user_id(); $contactUser = get_user_meta($wpUserID, 'glmMembersContactID', true); $contactActive = get_user_meta($wpUserID, 'glmMembersContactActive', true); if ($contactUser && !$contactActive) { - update_option('glmMembersDatabaseContactsRestrictedLogin', true); + update_user_meta($wpUserID, 'glmMembersDatabaseContactRestrictedLogin', true); wp_logout(); } - +*/