- fixed account form;

This commit is contained in:
Mykyta Synelnikov
2023-07-01 12:46:43 +03:00
parent dad4c8017c
commit 755ff6a790
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -1458,11 +1458,12 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
// phpcs:ignore WordPress.Security.NonceVerification -- already verified here
$sorting = sanitize_text_field( $_POST['sorting'] );
$sorting_fields = maybe_serialize( $directory_data['sorting_fields'] );
foreach ( $sorting_fields as $field ) {
if ( isset( $field[ $sorting ] ) ) {
$custom_sort_type = ! empty( $field['type'] ) ? $meta_query->get_cast_for_type( $field['type'] ) : 'CHAR';
$custom_sort_order = $field['order'];
if ( ! empty( $sorting_fields ) && is_array( $sorting_fields ) ) {
foreach ( $sorting_fields as $field ) {
if ( isset( $field[ $sorting ] ) ) {
$custom_sort_type = ! empty( $field['type'] ) ? $meta_query->get_cast_for_type( $field['type'] ) : 'CHAR';
$custom_sort_order = $field['order'];
}
}
}
}
+1 -1
View File
@@ -2151,7 +2151,7 @@ if ( ! class_exists( 'um\core\User' ) ) {
*/
$changes = apply_filters( 'um_before_update_profile', $changes, $args['ID'] );
foreach ( $changes as $key => $value ) {
if ( $this->is_metakey_banned( $key, 'submission' ) ) {
if ( $this->is_metakey_banned( $key, ( 'account' !== $context ) ? 'submission' : '' ) ) {
continue;
}