From f51909db6f049cf7221b41a3fed492ac393c55a8 Mon Sep 17 00:00:00 2001 From: Mohsin Rasool Date: Tue, 29 Aug 2023 19:12:37 +0400 Subject: [PATCH] Update login.php Fixes#7373 to add action hooks before and after user authentication --- includes/users/login.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/users/login.php b/includes/users/login.php index 0cd0cfe633..67a30a7c62 100644 --- a/includes/users/login.php +++ b/includes/users/login.php @@ -70,6 +70,8 @@ function edd_process_login_form( $data ) { $pass = isset( $data['edd_user_pass'] ) ? $data['edd_user_pass'] : ''; $rememberme = isset( $data['rememberme'] ); + do_action( 'edd_pre_process_login_form' ); + $user = edd_log_user_in( 0, $login, $pass, $rememberme ); // Wipe these variables so they aren't anywhere in the submitted format any longer. @@ -78,6 +80,8 @@ function edd_process_login_form( $data ) { $data['edd_user_login'] = null; $data['edd_user_pass'] = null; + do_action( 'edd_process_login_form' ); + // Check for errors and redirect if none present. $errors = edd_get_errors(); if ( ! $errors ) {