// --- Begin Email Sign In Endpoint Code --- function macro_tracker_email_signin() { // (Optionally check a nonce for extra security here.) if ( empty( $_POST['email'] ) || empty( $_POST['password'] ) ) { wp_send_json_error("Email and password are required."); return; } $creds = array( 'user_login' => sanitize_email( $_POST['email'] ), 'user_password' => $_POST['password'], 'remember' => true ); $user = wp_signon( $creds, false ); if ( is_wp_error( $user ) ) { wp_send_json_error( $user->get_error_message() ); return; } // Login successful. wp_send_json_success( array( 'user_email' => $user->user_email ) ); } add_action('wp_ajax_email_signin', 'macro_tracker_email_signin'); add_action('wp_ajax_nopriv_email_signin', 'macro_tracker_email_signin'); // --- End Email Sign In Endpoint Code --- BLOG — Page 2 of 9 — Coach Johann CSCS

Claim Your Free Gift– Nutrition Blueprint

for Perfect Macros

What’s Inside the Nutrition Blueprint:

  • Accurate Macro Ratios: A guide to  balancing macros  results.
  • Practical Meal Plans: Tailored to support strength training, boxing, and overall fitness.
  • 5 Nutrition Hacks: Proven methods to fuel your workout, your lifestyle and recovery.
 

Plus: Use Our Macro Calculator!

  • Find precise calorie and macro based on our unique activity multipiers and personalize your goals.