This method lets you set a user. For example, to retrieve a profile or anything related to that user.
<?php UM()->user()->set( $user_id, $clean = false ); ?>
(numeric) (optional) Which user to retrieve. A numeric user ID
(boolean) (optional) Should be true or false. If you did not provide a user ID, It would set the currently logged-in user as a profile.
This API method does not return anything. It sets user-profiles and permissions and allows you to retrieve any details for that user.
The following example makes you set a user and retrieve their display name after that using the user API.
<?php UM()->user()->set( 12 ); $display_name = UM()->user()->profile['display_name']; // Should print user display name ?>