mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
-
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user