Enhance password reset logic and add Action Scheduler filter

Ensure proper handling of user data in password reset functions by adding checks and updating parameter handling. Introduce a new filter to extend site health information and include a setting for enabling email sending via Action Scheduler. Improve code clarity with updated comments and function annotations.
This commit is contained in:
Mykyta Synelnikov
2025-04-22 17:16:55 +03:00
parent 5fdf822183
commit 54deffd244
4 changed files with 41 additions and 7 deletions
+13
View File
@@ -43,6 +43,7 @@ if ( ! class_exists( 'um\action_scheduler\Init' ) ) {
public function __construct() {
if ( ! $this->can_be_active() ) {
add_action( 'init', array( $this, 'add_notice' ) );
add_filter( 'um_site_health_extend', array( $this, 'change_site_health' ) );
} else {
add_filter( 'um_settings_structure', array( $this, 'add_setting' ) );
// Since 2.10.3 we load library as soon as there are required library files.
@@ -67,6 +68,18 @@ if ( ! class_exists( 'um\action_scheduler\Init' ) ) {
);
}
/**
* Adds the Action Scheduler setting to Ultimate Member feature settings
*
* @param array $settings
*
* @return array
*/
public function change_site_health( $site_health ) {
$site_health['ultimate-member']['fields']['enable_as_email_sending']['value'] = __( 'No', 'ultimate-member' );
return $site_health;
}
/**
* Adds the Action Scheduler setting to Ultimate Member feature settings
*