- fix wrong user id in account block

This commit is contained in:
ashubawork
2023-04-27 12:51:57 +03:00
parent bcadcfc7bd
commit 5c40cf7b08
4 changed files with 48 additions and 32 deletions
+5 -1
View File
@@ -2076,7 +2076,11 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
function edit_field( $key, $data, $rule = false, $args = array() ) {
global $_um_profile_id;
$output = '';
if ( 1 === (int) $data['widget'] ) {
$_um_profile_id = get_current_user_id();
}
$output = '';
$disabled = '';
if ( empty( $_um_profile_id ) ) {
$_um_profile_id = um_user( 'ID' );