HELP! Frontend User Profile Edit Won’t Update Email

Your code looks ok. Maybe this line: elseif(email_exists(esc_attr( $_POST[’email’] )) != $current_user->id ) Should be elseif(email_exists(esc_attr( $_POST[’email’] )) != $current_user->ID ) Every developer should start with learning how to debug code. Otherwise you’re just trying stuff like a headless chicken ;-). WP Debugging In your wp-config.php, change: define( “WP_DEBUG”, false ); Into: define( “WP_DEBUG”, true … Read more

Using transients to store form notifications

I would use user ID then user IP if not logged in, you can store the result like the following: /* your form validation/submission logiccode goes here */ $max_execution_tim = @ini_get(‘max_execution_time’); $submission_result = array(‘message’ => ‘Worked!’, ‘status’ => ‘success’); // You can use this function: // https://stackoverflow.com/a/6718472/1321398 $user_ip = GetIP(); $transient_name = is_user_logged_in() ? “form_submission_user-” … Read more