diff --git a/inc/helpers/user-center-renderers/settings-account.php b/inc/helpers/user-center-renderers/settings-account.php index b48c3793..38c7d69f 100644 --- a/inc/helpers/user-center-renderers/settings-account.php +++ b/inc/helpers/user-center-renderers/settings-account.php @@ -11,6 +11,7 @@ $account_user = isset($target_user) && $target_user instanceof WP_User ? $target $account_user_id = $account_user instanceof WP_User ? (int) $account_user->ID : (int) ($user_id ?? 0); $account_email = $account_user instanceof WP_User ? (string) $account_user->user_email : ''; $account_phone = $account_user_id > 0 ? (string) get_user_meta($account_user_id, 'phone_number', true) : ''; +$account_phone_display = strlen($account_phone) > 10 ? substr_replace($account_phone, '****', 3, 4) : $account_phone; $account_oauth_new = $account_user_id > 0 && get_user_meta($account_user_id, 'oauth_new', true); $user_settings = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_all() : []; $sms_settings = class_exists('\AKSRT\Sms\SMS') ? \AKSRT\Sms\SMS::get_instance()->get_provider_config() : []; @@ -78,7 +79,7 @@ $render_phone_form = static function () use ($agreement): void {
' . esc_html($account_phone) . ''); ?>
' . esc_html($account_phone_display) . ''); ?>