mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-18 22:23:37 +09:00
- reviewed #1269;
- unified `UM()->fields()->editing` and `UM()->fields()->viewing` to bool variables use true|false in conditions to make `===` or `!==` comparing;
This commit is contained in:
@@ -1662,7 +1662,7 @@ function um_is_user_himself() {
|
||||
function um_can_edit_field( $data ) {
|
||||
$can_edit = true;
|
||||
|
||||
if ( ! empty( UM()->fields()->editing ) && isset( UM()->fields()->set_mode ) && UM()->fields()->set_mode == 'profile' ) {
|
||||
if ( true === UM()->fields()->editing && isset( UM()->fields()->set_mode ) && UM()->fields()->set_mode == 'profile' ) {
|
||||
if ( ! is_user_logged_in() ) {
|
||||
$can_edit = false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user