From 4833147aced5989e302656fb333bd54a22de86cd Mon Sep 17 00:00:00 2001 From: nikitasinelnikov Date: Thu, 24 Jan 2019 19:37:56 +0200 Subject: [PATCH] - --- includes/core/class-fields.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/core/class-fields.php b/includes/core/class-fields.php index 816feb8d..bac98794 100644 --- a/includes/core/class-fields.php +++ b/includes/core/class-fields.php @@ -578,16 +578,16 @@ if ( ! class_exists( 'um\core\Fields' ) ) { * @return mixed */ function field_value( $key, $default = false, $data = null ) { - if (isset( $_SESSION ) && isset( $_SESSION['um_social_profile'][$key] ) && isset( $this->set_mode ) && $this->set_mode == 'register') - return $_SESSION['um_social_profile'][$key]; + if ( isset( $_SESSION ) && isset( $_SESSION['um_social_profile'][ $key ] ) && isset( $this->set_mode ) && $this->set_mode == 'register' ) + return $_SESSION['um_social_profile'][ $key ]; $type = ( isset( $data['type'] ) ) ? $data['type'] : ''; // preview in backend - if (isset( UM()->user()->preview ) && UM()->user()->preview) { + if ( isset( UM()->user()->preview ) && UM()->user()->preview ) { $submitted = um_user( 'submitted' ); - if (isset( $submitted[$key] ) && !empty( $submitted[$key] )) { - return $submitted[$key]; + if ( isset( $submitted[ $key ] ) && !empty( $submitted[ $key ] ) ) { + return $submitted[ $key ]; } else { return 'Undefined'; } @@ -595,12 +595,12 @@ if ( ! class_exists( 'um\core\Fields' ) ) { // normal state if ( isset( UM()->form()->post_form[ $key ] ) ) { - + //show empty value for password fields if ( strstr( $key, 'user_pass' ) && $this->set_mode != 'password' ) { return ''; } - return stripslashes_deep( UM()->form()->post_form[$key] ); + return stripslashes_deep( UM()->form()->post_form[ $key ] ); } elseif ( um_user( $key ) && $this->editing == true ) { @@ -758,7 +758,7 @@ if ( ! class_exists( 'um\core\Fields' ) ) { } // Default Value for Registration Form and Profile Form editing - if ( !isset( $value ) && ( $this->set_mode == 'register' || $this->editing == true ) ) { + if ( ! isset( $value ) && ( $this->set_mode == 'register' || $this->editing == true ) ) { /** * UM hook