HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/z/w/a/zwafgyp/coolswim/wp-content/plugins/ultimate-member/includes/core/um-actions-access.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Profile Access
 *
 * @param int $user_id
 */
function um_access_profile( $user_id ) {
	if ( ! um_is_myprofile() && um_is_core_page( 'user' ) && ! current_user_can( 'edit_users' ) ) {
		$account_status = UM()->common()->users()->get_status( $user_id );
		if ( 'approved' !== $account_status ) {
			um_redirect_home();
		}
	}
}
add_action( 'um_access_profile', 'um_access_profile' );