mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- fixed fields visibility;
This commit is contained in:
@@ -1624,7 +1624,7 @@ function um_can_view_field( $data ) {
|
||||
if ( ! is_user_logged_in() ) {
|
||||
$can_view = false;
|
||||
} else {
|
||||
if ( ! UM()->roles()->um_user_can( 'can_edit_everyone' ) && ! empty( $data['roles'] ) ) {
|
||||
if ( ! empty( $data['roles'] ) ) {
|
||||
if ( empty( $current_user_roles ) || count( array_intersect( $current_user_roles, $data['roles'] ) ) <= 0 ) {
|
||||
$can_view = false;
|
||||
}
|
||||
@@ -1635,7 +1635,7 @@ function um_can_view_field( $data ) {
|
||||
if ( ! is_user_logged_in() ) {
|
||||
$can_view = false;
|
||||
} else {
|
||||
if ( ! UM()->roles()->um_user_can( 'can_edit_everyone' ) && ! um_is_user_himself() && ( empty( $current_user_roles ) || ( ! empty( $data['roles'] ) && count( array_intersect( $current_user_roles, $data['roles'] ) ) <= 0 ) ) ) {
|
||||
if ( ! um_is_user_himself() && ( empty( $current_user_roles ) || ( ! empty( $data['roles'] ) && count( array_intersect( $current_user_roles, $data['roles'] ) ) <= 0 ) ) ) {
|
||||
$can_view = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user