set
Description
This method lets you set a user. For example, to retrieve a profile or anything related to that user.
Usage
<?php UM()->user()->set( $user_id, $clean = false ); ?>
Parameters
$user_id
(numeric) (optional) Which user to retrieve. A numeric user ID
$clean
(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.
Returns
This API method does not return anything. It sets user-profiles and permissions and allows you to retrieve any details for that user.
Examples
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 ?>