I am trying to get current logged in user data using API
I have tried the code below but its not returning anything
<code>
$current_user_object = postToURL( buildURL( 'APIUser', 'getCurrentUserObject' ) );
var_dump($current_user_object);
</code>
however if I try to get user data after specifying arguments the code below works fine
<code>
$user_data = postToURL( buildURL( 'APIUser', 'getUser' ), array( $arguments ) );
print_r($user_data);
</code>
Is there a way to get current logged in user name or ID given that the user is already logged in using API.
API getting current logged in user data
Re: API getting current logged in user data
Try this:
Code: Select all
postToURL( buildURL( 'APIAuthentication', 'getCurrentUser' ), NULL );
TimeTrex Community Edition is developed and supported by volunteers.
Help motivate us to continue by showing your appreciation!
Help motivate us to continue by showing your appreciation!
Re: API getting current logged in user data
That has worked. Thank you