um_profile_id

Description

This function returns the user ID for the current profile.

Usage

<?php $user_id = um_profile_id(); ?>

Returns

Returns the user ID of the profile if found, or the current user ID if a user is logged in. Also returns blank if no user ID is set.

Examples

The example below will retrieve the user ID when viewing someone's profile.

<?php
$user_id = um_profile_id();
if ( $user_id == 1 ) {
 echo 'This is administrator profile.';
 }
?>