fix postmeta when field = 0

This commit is contained in:
andrewshuba
2019-02-28 16:11:43 +02:00
parent d2bdba2f6d
commit 8acf91dc9d
2 changed files with 8 additions and 3 deletions
+5 -1
View File
@@ -1672,7 +1672,11 @@ if ( ! class_exists( 'um\core\User' ) ) {
foreach ( $changes as $key => $value ) {
if ( ! in_array( $key, $this->update_user_keys ) ) {
update_user_meta( $this->id, $key, $value );
if( $value == 0 ){
update_user_meta( $this->id, $key, '0' );
} else {
update_user_meta( $this->id, $key, $value );
}
} else {
$args[ $key ] = esc_attr( $changes[ $key ] );
}