New user registration creates Notice
-
A new user registering creates the following error:
Notice: Trying to get property of non-object in /wp-content/plugins/front-end-only-users/Functions/Prepare_Data_For_Insertion.php on line 65
Fixed by replacing Line 65 and then by adding a line below Line 25:
Line 65:
if ($User->User_ID != "") {$user_update = __("There is already an account with that Username. Please select a different one.", "EWD_FEUP"); return $user_update;}
Replace With:
if ($User_ID != "") {$user_update = __("There is already an account with that Username. Please select a different one.", "EWD_FEUP"); return $user_update;}
Lines 23-25:
$User = $wpdb->get_row($wpdb->prepare("SELECT User_ID FROM $ewd_feup_user_table_name WHERE Username='%s'", $UserCookie['Username'])); if (is_object($User)) {$User_ID = $User->User_ID;} if (is_admin()) {$User_ID = $_POST['User_ID'];}
Replace With:
$User = $wpdb->get_row($wpdb->prepare("SELECT User_ID FROM $ewd_feup_user_table_name WHERE Username='%s'", $UserCookie['Username'])); if (is_object($User)) {$User_ID = $User->User_ID;} if (is_admin()) {$User_ID = $_POST['User_ID'];} if (!isset($User_ID)) {$User_ID = null;}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘New user registration creates Notice’ is closed to new replies.