This commit is contained in:
nikitasinelnikov
2019-01-24 19:37:56 +02:00
parent e90c9b9fce
commit 4833147ace
+8 -8
View File
@@ -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