set

Description

This method lets you set a user. For example, to retrieve a profile or anything related to that user.

Usage

<?php $ultimatemember->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. Basically, if you did not provide a user ID It will set the current logged in user as a profile

Returns

This API method does not return anything. It sets user profile and permissions and allow 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
$ultimatemember->user->set( 12 );
$display_name = $ultimatemember->user->profile['display_name']; // Should print user display name
?>